Search:

Type: Posts; User: helloworld922

Search: Search took 0.12 seconds.

  1. Thread: Heaps

    by helloworld922
    Replies
    3
    Views
    4,230

    Re: Heaps

    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...
  2. Thread: Heaps

    by helloworld922
    Replies
    3
    Views
    4,230

    Re: Heaps

    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...
Results 1 to 2 of 2