04 2020 档案
摘要://希尔排序 #include <iostream> using namespace std; int main(){ int a[10] = {2,5,9,6,4,3,5,10,7,6}; int h = 9; while(h>=1) { for(int i = h;i<10;i++) { int
阅读全文
摘要://冒泡排序 #include <iostream> #include <algorithm> using namespace std; int main() { int a[10] = {2,5,9,6,4,3,5,10,7,6}; for(int i = 0;i<10-1;i++) { for(
阅读全文
摘要://选择排序 #include <iostream> #include <algorithm> using namespace std; int main() { int a[10] = {2,5,9,6,4,3,5,10,7,6}; int max,index; for(int i = 0;i<1
阅读全文
摘要:1 #include<iostream> 2 using namespace std; 3 void InsertSort(int a[],int n) 4 { 5 for(int i = 1;i<n;i++) 6 { 7 int k = i; 8 int pre = i-1; 9 int cur
阅读全文
摘要:1 #include<iostream> 2 using namespace std; 3 Paritition(int A[], int low, int high) { 4 int pivot = A[low]; 5 while (low < high) { 6 while (low < hig
阅读全文

浙公网安备 33010602011771号