- 博客(2)
- 收藏
- 关注
原创 归并排序算法的伪代码和实现
伪代码MERGE(A,p,q,r) n1=q-p+1; n2=r-q; create new arrays L[n1+1] and R[n2+1] for i=0 to n1-1 L[i]=A[p+i] for j=0 to n2-1 R[j]=A[q+1+j] L[n1]=1000//假设1000是无穷大 ...
2018-04-18 22:34:19 15539
原创 插入排序伪代码和实现
插入算法伪代码for j=2 to A.length key=A[j] i=j-1; while i>0 and A[i]>key A[i+1]=A[i] i=i-1 A[i+1]=keyc实现void main(){ int A[]={3,8,1,4,5,0,2,5}; int j;...
2018-04-18 16:00:31 6401
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人