`
java-mans
  • 浏览: 11455999 次
文章分类
社区版块
存档分类
最新评论

Bubble sort and its implementation

 
阅读更多

Bubble sort is quite like the insertion sort. In the insertion sort, the left part of the array is always ordered, which is the same in Bubble sort.

In bubble sort, the adjacent elements are compared and swaped if the higher element is larger than the lower element, and the compare-and-swap procedure will stop when the bubble sort reach the upper bound of the unsorted array.

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics