读书笔记
文章平均质量分 80
d3y1
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
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 · 560 阅读 · 0 评论 -
INSERTION-SORT: INTRODUCTION TO ALGORITHMS
Pseudo codeINSERTION-SORT(A) 1 for j=2 to A.length 2 key = A[j] 3 //Insert A[j] into the sorted sequence A[1..j-1] 4 i = j-1 5 while i>0 and A[i]>key 6 A[i+1] = A[i] 7 i原创 2015-05-31 13:22:39 · 655 阅读 · 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 · 816 阅读 · 0 评论
分享