This preview shows pages 1–12. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: code would probably be to pick the last value in the list as the pivot and then partition based on that. There are many ways to implement the partition algorithm, but in terms of data comparisons, what should its runtime be? Start with T(0) = T(1) = 0 For the recurrence, what is: The worst case split? The best case split? The average/expected runtime? Lets return to the idea of expected values. Lets assume that every division situation is equally likely. If we let pos p represent the position of p, then we could represent the expected runtime as being:...
View Full
Document
 Fall '11
 Staff

Click to edit the document details