摘要: bubble_sort:将序列划分为无序区跟有序区,不断通过交换较大的元素至无序区尾完成排序。 1 #include 2 #include 3 4 using namespace std; 5 6 void bubble_sort(int arr[], int n){ 7 for (int i = 0; i 2 #include 3 #include 4 5 using namespace std; 6 #define lson(x) (x a[Max]) Max = ls;19 if (rs a[Max]) Max = rs;20 if (Max ... 阅读全文
posted @ 2013-08-26 22:05 Missa 阅读(384) 评论(0) 推荐(0) 编辑