![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
读书笔记
dijk
这个作者很懒,什么都没留下…
展开
-
BUBBLESORT: INTRODUCTION TO ALGORITHMS
Pseudo codeBUBBLESORT(A) 1 for i=1 to A.length-1 2 for j=A.length downto i+1 3 if A[j] < A[j-1] 4 exchange A[j] with A[j-1]Reference<< Introduction to Algorithms >> Thi原创 2015-05-31 13:06:20 · 487 阅读 · 0 评论 -
INSERTION-SORT: INTRODUCTION TO ALGORITHMS
Pseudo codeINSERTION-SORT(A)1 for j=2 to A.length2 key = A[j]3 //Insert A[j] into the sorted sequence A[1..j-1]4 i = j-15 while i>0 and A[i]>key6 A[i+1] = A[i]7 i原创 2015-05-31 13:22:39 · 581 阅读 · 0 评论 -
MERGE-SORT: INTRODUCTION TO ALGORITHMS
Merge sort:归并排序Animation An example of merge sort. First divide the list into the smallest unit (1 element), then compare each element with the adjacent list to sort and merge the two adjacent lists.原创 2015-05-31 13:17:01 · 713 阅读 · 0 评论