This days I always study this book,because I want to study Algorithm and several tell me this book is very good.So I begin to read it.Unfortunately,I only find a English Version.But I still to read it. May be it will be very hard ,I want to try.
I have just learn some algorithms of sorting.in order to remember those,I write them.
The first one is Insertion sorting.
this is the codes:
insertion-sort(A)
for j=2 to length[A];
do key <- A[j];
//insert the key to the A[1,j-1];
i=j-1;
while i>0;A[i]>A[j];
do A[i+1]=A[i];
i=i-1
A[i+1]=key;
I don't want to write...
363



被折叠的 条评论
为什么被折叠?



