Definition: A sort algorithm in which the sorted items occupy the same storage as the original ones. These algorithms may use o(n) additional memory for bookkeeping, but at most a constant number of items are kept in auxiliary memory at any time.
Also known as sort in place.
Specialization (... is a kind of me.)
American flag sort, quicksort, insertion sort, selection sort, Shell sort, diminishing increment sort, J sort, gnome sort.
Definition: A sort algorithm in which the sorted items occupy the same storage as the original ones. These algorithms may use o(n) additional memory for bookkeeping, but at most a ...
你可以说heap是sort in place 也可以说不是,这个不会细考的,因为heap排序的原理就是先搞成max heap 或min heap, 然后一次次的取root来排,如果你将heap按 level顺序放在数组里,每次取出的root扔到这个数组后面,那就是 in place sort, 你要非用另外一个数组存放,那就不算,我记得当年学这个的时候老师讲的很明白,那本英文原版书也写得很明白,大家不要争了