Home > SparkNotes > Computer Science Study Guides > Heap >

sparknotes

Heaps / Heap Sort


Heap Sort Problems

Problem : In terms of space, why is heap sort attractive?


Problem : Does the following array represent a heap?


{8, 5, 9, 3, 6, 2, 1}


Problem : What is the maximum depth of a heap with n elements?


Problem : Imagine that instead of using an array to represent the heap, we use a singly linked list. Why might this be innefficient? (Hint: Consider the insertions that must be done).