Algorithms and Data Structures [30 Days] Training Camp - Principles and Code Explanation of Bubble Sort and Quick Sort (23)

Bubble Sort

Bubble sort is to compare the size of two adjacent data in a sequence in turn, and exchange the largest or smallest data to the last position by continuously exchanging the position of the data, so as to achieve the sorting method of data sorting.

insert image description here

排序用例: {
   
    
     3 1 2 0 }
第一轮:完成数字3的排序
	比较(3 >

Guess you like

Origin blog.csdn.net/weixin_47723732/article/details/127475621