希尔排序 - 插入排序的改进版。为了减少数据的移动次数,在初始序列较大时取较大的步长,通常取序列长度的一半,此时只有两个元素比较,交换一次;之后步长依次减半直至步长为1,即为插入排序,由于此时序列已接近有序,故插入元素时数据移动的次数会相对较少,效率得到了提高。 时间复杂度:通常认为是O(N3/2) ,未验证 稳定性:不稳定 @param arr
(int arr[])
source not stored for this graph (policy: none)
nothing calls this directly
no outgoing calls
no test coverage detected