http://www.perlmonks.org?node_id=383044


in reply to Re^4: Re-orderable keyed access structure?
in thread Re-orderable keyed access structure?

  1. Iterating the heap to find the highest weight and adding one. One recursive operation that will then trigger another. (In Perl not C)

See, you didn't actually understand. Where is the element with the greatest value in a heap? Always at the root. :-)

You also didn't pay attention to my comment that a complete binary tree can be represented trivially using an array. You don't need linked lists, just index math.

Makeshifts last the longest.