Published onOctober 22, 2026Heap SortData StructuresHeaps, the array layout of a complete binary tree, max-heap, sift-down, building a heap in O(n), heap sort in O(n log n), in-place, unstable, C/Python implementations with an animated sort