Apr 24, 2011 at 12:51pm Apr 24, 2011 at 12:51pm UTC
hi, anywhere i can get help on the above? thanks.
Last edited on Apr 27, 2011 at 4:12pm Apr 27, 2011 at 4:12pm UTC
Apr 24, 2011 at 1:58pm Apr 24, 2011 at 1:58pm UTC
arranging the range of any numbers accordingly based on inorder transversal of the heap
Last edited on Apr 24, 2011 at 1:59pm Apr 24, 2011 at 1:59pm UTC
Apr 27, 2011 at 4:12pm Apr 27, 2011 at 4:12pm UTC
is there anyway to do without a pointer insteaD?
Apr 27, 2011 at 4:52pm Apr 27, 2011 at 4:52pm UTC
Oh. So you've flattened your heap into an array?
If the height of a complete binary tree is h, the number of nodes in it n = 2h -1 from which you can easily find h.