Heaps: BuildHeap Exercises

  < Previous  Next >
Do the following steps individually, then confer with your neighbor(s):
  1. Write down the code for buildHeap() (feel free to use bubbleDown()).
  2. Show the resulting heap and its corresponding array after each iteration of buildHeap() given the following initial array:
    1 2 3 4 5 6 7 8
  3. What is the Big-Oh for buildHeap()?

Last Modified: