- 算法描述:
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
本文详细介绍了插入排序算法的工作原理,包括将列表分为已排序和未排序两部分的基本步骤,并阐述了如何将未排序部分的第一个元素放入已排序部分的正确位置。此外,还分析了该算法的时间复杂度为O(n^2),并指出它适用于列表和链表,且是一种稳定的排序算法。

897

被折叠的 条评论
为什么被折叠?



