in reply to Binary heap implementation.

Have a look at Heap or Heap::Binary ...