摘要: 代码中所有数组都是 1~n。 1、冒(起)泡排序 1 void sort1( int a[],int n) 2 { 3 for(int i=1; i<=n-1; i++) 4 for(int j=1; j<=n-i; j++) 5 if(a[j+1]<a[j]) 6 swap(a[j],a[j+1] 阅读全文
posted @ 2019-09-01 17:15 hbhdhd 阅读(180) 评论(0) 推荐(0) 编辑