{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# hw3 - k ≥ 1 design an O k log k time algorithm to Fnd the...

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

CSE 413, Analysis of Algorithms Fall Semester, 2004 Assignment 3: Data Structures Due Date : Sept. 27, 2004 (at the beginning of CSE 413 class) Note : The problems in this assignment are quite diﬃcult! Please start working on them as early as possible, and ask questions if clarifications or further explanations are needed. The techniques discussed in class on adding and maintaining additional information in data structures are essential for the solutions of problems 2, 3, and 4. 1. Given a min-heap H of n keys stored in an array and an integer
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: k ≥ 1, design an O ( k log k ) time algorithm to Fnd the k-th smallest key in H . Note that k can be much smaller than n , and thus you cannot assume that log k = Θ(log n ) in general. ( 20 points ) Hint : Your algorithm may make use of a heap data structure, say H . What would your heap H contain and how would your algorithm make use of it? 2. Exercise 4.16, page 88. ( 20 points ) 3. Exercise 4.26, page 89. ( 20 points ) 4. Exercise 4.28, page 89. ( 20 points ) Total Points : 80...
View Full Document

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern