我的C算法库【2】:SelectionSort:

来源:互联网 发布:罗技 m705 mac 编辑:程序博客网 时间:2024/06/16 07:56

SelectionSort:

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 - 1 elements of A. Write pseudocode for this algorithm, which is known as selection sort. 

 

原创粉丝点击