![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
my work
文章平均质量分 79
citylove
这个作者很懒,什么都没留下…
展开
-
Heapsort algorithm
/* the purpose of this program is to sort the array by using heap. The subroutine INPUT_ARRAY is to input the numbers of the array. the subroutine MAX_HEAPIFY is to maintain the property of MAX-HEAP by permutating the i node and its children node which原创 2011-04-25 21:28:00 · 518 阅读 · 0 评论 -
Insertion sort algorithm
Insertion sort is an efficient algorithm for sorting a small number of elements, which costs O(n2).The operation of INSERTION-SORT on the array A = 〈5, 2, 4, 6, 1, 3〉. Array indices appear above the rectangles, and values stored in the array positions原创 2011-04-25 22:36:00 · 820 阅读 · 0 评论 -
Selection sort
<br /><br />Consider sorting n numbers stored in array A by first finding the smallest element of A and exchanging it with the element in A[1]. Then find the second smallest element of A, and exchange it with A[2]. Continue in this manner for the first n原创 2011-04-25 22:53:00 · 491 阅读 · 0 评论