插入排序(Insertion sort)

xiaoxiao2021-02-27  702

算法描述: the list is divided into two sublists: sorted and unsorted.

Step1: move the first element of the unsorted list into the sorted list in the proper place.

Step2: repeat this process on the resulting list

适用:list和linked list

时间复杂度:the time required is O(n^2), it is proportional to n^2, where n is the number of data items in the array

稳定性:stable
转载请注明原文地址: https://www.6miu.com/read-588.html

最新回复(0)