{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# isuhw3 - [05(10 pts Exercise 6.4-3 page 136[06(10 pts...

This preview shows page 1. Sign up to view the full content.

HW 03 -- ComS 311 -- Fall 2005 Due Date -- Friday, September 16 Some problems in this assignment may not be graded! You, however, should do all the problems because the choice of problems to be graded will be made after due date. A. All of Chapters 1 – 4 of CLRS should have been read, except Section 4.4 . B. Current Reading Assignment: Chapter 6 (all of it). C. Do the following problems (those with page numbers are from CLRS): [01] (10 pts.) Exercise 6.1-7, page 130. [02] (10 pts.) Exercise 6.2-5, page 132. [03] (10 pts.) Exercise 6.2-6, page 132. . [04] (10 pts.) Exercise 6.3-1, page 135.
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: [05] (10 pts.) Exercise 6.4-3, page 136. [06] (10 pts.) Exercise 6.5-7, page 142 [07] (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). [08](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

{[ snackBarMessage ]}

Ask a homework question - tutors are online