Lecture10-quicksort

Lecture10-quicksort - This work is licensed under a...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 312: Algorithm Analysis Lecture #10: Analysis of Quicksort This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License. Slides by: Eric Ringger, with contributions from Mike Jones, Eric Mercer, Sean Warnick
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Announcements § HW #7 Due Today § Questions about Non-homogeneous RR or Change-of-variable? § Project #2 § Early: today § Due: Monday
Background image of page 2
Starting a Career § Career Fair Preview § Wednesday, Feb. 1 § 5:00 p.m. § in 1170 TMCB § BYU Technical Career Fair § Thursday, Feb. 2 § 9 a.m. to 3 p.m. § Wilkinson Center Ballroom
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Objectives § Answer your questions about RRs § Review theoretical analysis of Quicksort § Worst case § Best case § Empirical analysis of Quicksort § Prepare for average case analysis
Background image of page 4
Follow-up Questions: Recurrence Relations
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Part III, Problem #3 (for fun)
Background image of page 6
Efficient Sorting
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Quicksort § Quicksort sorts in place § Example: Pivot about first element (3) § 3 1 4 1 5 9 2 6 5 3 5 8 9 --- before § 2 1 3 1 3 9 5 6 5 4 5 8 9 --- after § At most n swaps § Pivot element ends up in it’s final position § No element left or right of pivot will flip sides again § Sort each side independently § Recursive Divide and Conquer approach
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/02/2012 for the course C S 312 taught by Professor Jones,m during the Winter '08 term at BYU.

Page1 / 34

Lecture10-quicksort - This work is licensed under a...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online