Heaps
1 problem from Rosalind — Algorithmic Heights. Press Run on any block to execute it in your browser.
HEA — Building a Heap
solved Problem statement
Any permutation with the heap property is accepted, so the property is what is asserted. Floyd's construction reaches 7 3 5 1 2 where the sample shows 7 5 1 3 2.