![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法
芊李马
这个作者很懒,什么都没留下…
展开
-
合并排序
#include #include #include using namespace std; template void merge(type c[],type d[],int l,int m,int r) { int i,j,k; k=i=l; j=m+1; while((i<=m)&&(j<=r)) { if(c[i]<=c[j]原创 2013-10-12 09:58:34 · 521 阅读 · 0 评论 -
快速排序
#include using namespace std; template void Swap(Type &a,Type &b) { Type tem=a; a=b; b=tem; } template int Partition(Type a[],int p,int r) { int i=p,j=r+1; Type x=a[p]; while(true)原创 2013-10-12 10:36:18 · 513 阅读 · 0 评论