Unformatted text preview:  (10 pts.) Exercise 6.4-3, page 136.  (10 pts.) Exercise 6.5-7, page 142  (10 pts.) 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). (10 pts.) Given a set S of n numbers, we want to construct an algorithm that outputs t h e k smallest members of S in sorted order. (a) Describe an algorithm that uses ) lg ( n n O time and ) ( n O space. (b) Describe an algorithm that uses a heap and solves the problem in ) lg ( n k n O + time and ) ( n O space....
View Full Document
- Fall '08
- 1920, 1924, 1918, 1926, 1925, 1923