摘要:        
1 //插入排序 2 void InsertionSort(ElementType A[], int N) 3 { 4 int p, i, tmp; 5 for(p = 1; p = 1) 10 { 11 if(A[i-1] > tmp) 12 A[i] = A[i-1]; //...    阅读全文
posted @ 2018-10-08 21:42
拾月凄辰
阅读(176)
评论(0)
推荐(0)
        
            
        
        
摘要:        
1 void Swap(ElementType *a, ElementType *b) 2 { 3 ElementType tmp = *a; 4 *a = *b; 5 *b = tmp; 6 } 7 8 //选择排序 9 void SelectionSort(ElementType A[], int N) 10 { 11 for(in...    阅读全文
posted @ 2018-10-08 20:24
拾月凄辰
阅读(116)
评论(0)
推荐(0)
        
            
        
        
摘要:        
1 void Swap(ElementType *a, ElementType *b) 2 { 3 ElementType tmp = *a; 4 *a = *b; 5 *b = tmp; 6 } 7 8 //冒泡排序 9 void BubbleSort(ElementType A[], int N) 10 { 11 for(in...    阅读全文
posted @ 2018-10-08 19:58
拾月凄辰
阅读(129)
评论(0)
推荐(0)
        

 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号