ternary-heapsort Typical heapsort with the array organized as a ternary tree I'm still impressed by how compact heapsort is. I had this one use 0 as the first element, even though starting with 1 is easier.