Dale - Computer Science Illuminated 319

Dale - Computer Science Illuminated 319 - 292 Chapter 9...

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

View Full Document Right Arrow Icon
292 Chapter 9 Abstract Data Types and Algorithms A...Z A...L G...L A...F M...Z S...Z M..R Figure 9.12 Ordering a list using the Quicksort algorithm Eventually all the small sorted piles can be stacked one on top of the other to produce a sorted set of tests. See Figure 9.12. This strategy is based on recursion—on each attempt to sort the stack of tests, the stack is divided, and then the same approach is used to sort each of the smaller stacks (a smaller case). This process goes on until the small stacks do not need to be divided further (the base case). The parameter list of the Quicksort algorithm reflects the part of the list that is currently being
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/13/2011 for the course CSE 1550 taught by Professor Marianakant during the Fall '10 term at York University.

Ask a homework question - tutors are online