HW7 - c Suppose we change the partitioning strategy so that i stops at an element with the same key as the pivot but j does not sto p p.259 7.32

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

View Full Document Right Arrow Icon
Sheet1 Page 1 p.257 7.4 Show the result of running Shellsort on the input 9, 8, 7, 6, 5, 4, 3, 2, 1 using the increments {1, 3, 7}. p.258 7.14 How would you implement mergesort without using recursion? p.258 7.20 a. For the quicksort implementation in this chapter, what is the running time when all keys are equal? b. Suppose we change the partitioning strategy so that neither i nor j stops when an element with the same key as the pivot is
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: c. Suppose we change the partitioning strategy so that i stops at an element with the same key as the pivot, but j does not sto p p.259 7.32 Suppose you have an array of N elements, containing three distinct keys, "true", "false", and "maybe". Given an O(N) algorith m...
View Full Document

This note was uploaded on 02/16/2011 for the course CS 136 taught by Professor Yuechen during the Winter '08 term at Zhejiang University.

Ask a homework question - tutors are online