随笔分类 - C++排序练习
摘要:归并排序实质是将一个无序数组拆分成多个数组再分别排序,再通过对比合并成一个有序数组 #include<iostream> #include<ctime> using namespace std; #define number 100 int main() { srand((unsigned int)
阅读全文
摘要:#include<iostream> #include<ctime> using namespace std; #define number_i 3 #define number_j 3 int **get_disorder_arr() { //生成二维数组的指针 int **arr=new int
阅读全文
摘要:#include<iostream> #include<ctime> using namespace std; #define number 10 int main() { srand((unsigned int)time(NULL)); int arr[number]; int flag=0; /
阅读全文
摘要:假定一组随机数,然后快速找到第num位置的数 #include<iostream> #include<ctime> using namespace std; #define number 10 #define num 7 int main() { srand((unsigned int)time(N
阅读全文
摘要:#include<iostream> #include<string> #include<ctime> using namespace std; #define max 100000 void Bubble(int arr[]); int main() { //int arr[6]={5,4,8,7
阅读全文

浙公网安备 33010602011771号