![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
排序
森-Js
521
展开
-
直接插入排序
#include<iostream> using namespace std; #define max 20 typedef struct{ int key; }Redtype; typedef struct{ Redtype r[max+1]; int length; }sqlist; void insertsort(sqlist &L) { ...原创 2018-12-20 20:14:02 · 302 阅读 · 0 评论 -
折半插入排序
#include<iostream> using namespace std; #define max 20 int i,j; typedef struct{ int key; }Redtype; typedef struct{ Redtype r[max+1]; int length; }sqlist; /*void insertsort(sqlist &L) /...原创 2018-12-20 20:48:55 · 354 阅读 · 0 评论 -
快速排序
#include<iostream> using namespace std; #define max 20 int i,j,k,low,high,p,pk; typedef struct { int key; int otherwise; } type; typedef struct { //定义结构体 type a[max]; int length; } sqlist...原创 2019-01-01 20:29:51 · 90 阅读 · 0 评论 -
直接插入排序、折半插入排序、希尔排序
#include<iostream> #include<cstring> using namespace std; #define max 100 int i,j,k,low,high,mid; typedef struct { string name; int chengji; } student; typedef struct { student s[max];...原创 2019-01-01 20:31:35 · 193 阅读 · 0 评论