12.07.2015 Views

A Practical Introduction to Data Structures and Algorithm Analysis

A Practical Introduction to Data Structures and Algorithm Analysis

A Practical Introduction to Data Structures and Algorithm Analysis

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

530 Chap. 15 Lower Bounds15.18 Write the complete algorithm for the merge insert sort sketched out in Section15.7.15.19 Here is a suggestion for what might be a truly optimal sorting algorithm. Pickthe best set of comparisons for input lists of size 2. Then pick the best set ofcomparisons for size 3, size 4, size 5, <strong>and</strong> so on. Combine them <strong>to</strong>gether in<strong>to</strong>one program with a big case statement. Is this an algorithm?15.10 Projects15.1 Implement the median-finding algorithm of Section 15.6. Then, modify thisalgorithm <strong>to</strong> allow finding the ith element for any value i < n.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!