數據結構之排序篇——冒泡排序 //逆序則交換

typedef int DataType; void bubble(DataType* a, int n) {     for (int i = 0; i < n - 1; i++) {         bool flag = true;         for (int j = 0; j < n -  i - 1; j++) {             if (a[j] > a[j + 1])
相關文章
相關標籤/搜索