标签:int col class key for pre list 冒泡 冒泡排序
1 void bubbleSort(LineList R[], int n) 2 { 3 int i, j; 4 for (i = 1; i < n; i++) 5 { 6 for (j = 1; j <= n - i; j++) 7 { 8 if (R[j].key > R[j + 1].key) 9 { 10 R[0] = R[j]; 11 R[j] = R[j + 1]; 12 R[j + 1] = R[0]; 13 } 14 } 15 } 16 }
标签:int col class key for pre list 冒泡 冒泡排序
原文地址:http://www.cnblogs.com/abc-begin/p/7641814.html