一、冒泡排序 #include <iostream> using namespace std; void print_array(int a[], int n) { for(int i = 0; i < n; i++) cout << a[i] << " " ; cout << endl; } vo    Read More
posted @ 2019-04-23 23:16
Brickert
Views(336)
Comments(0)
Diggs(0)
        
            
        
        
        
插入排序的思想:每次将一个待排序的记录,按其关键字大小插入到前面已经排好序的子数组中的适当位置,直到全部记录插入完成为止。 一、直接插入排序 #include <iostream> using namespace::std; //打印 void print_array(int a[], int n)    Read More
posted @ 2019-04-23 16:23
Brickert
Views(286)
Comments(0)
Diggs(0)
        
 
                     
                    
                 
                    
                
 
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号