here's the algorithm's pseudo-code:
1. put everything as-is into your heap array.
2. Starting from the back, compare that element with it's two children's. Take the smallest of the three (a...
Type: Posts; User: helloworld922
here's the algorithm's pseudo-code:
1. put everything as-is into your heap array.
2. Starting from the back, compare that element with it's two children's. Take the smallest of the three (a...
There should already be elements in the first three spots. To build the heap bottom-up all you need to do is move elements around.
This is done by comparing the parent with both children (if there...