|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Heap Sort Problems
Problem 1.1:
In terms of space, why is heap sort attractive?
[Solution]
Problem 1.2:
Does the following array represent a heap?
{8, 5, 9, 3, 6, 2, 1}
[Solution]Problem 1.3:
What is the maximum depth of a heap with n elements?
[Solution]
Problem 1.4:
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).
[Solution]
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contact Us | Privacy Policy | Terms and Conditions | About
©2006 SparkNotes LLC, All Rights Reserved.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||