- 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.