#include <iostream> #include <algorithm> #include <cstdio> #include <cmath> #include <cstring> #include <string> #include <string.h> #include <map> #include <set> #include <queue> #include <deque> #include <list> #include <bitset> #include <stack> #include <stdlib.h> using namespace std; using namespace std; /* 输入一组关键字序列分别实现下列排序: 1.实现简单选择排序、直接插入排序和冒泡排序。 2.实现希尔排序算法。 3.实现快速排序算法。 4.实现堆排序算法。 */ #define Maxsize 100 typedef int KeyType; typedef int InfoType; typedef struct { KeyType key; InfoType info; }Type; typedef struct { Type r[Maxsize+1]; int len; }Sqlist; int data[Maxsize]; void Create(Sqlist &L,int n) { L.len = n; for(int i=1;i<=n;i++) { cin>>L.r[i].key; L.r[i].info = 0; } } void Print(Sqlist L) { cout&l
数据结构实验——排序
最新推荐文章于 2022-04-12 10:45:47 发布