292Chapter 9Abstract Data Types and AlgorithmsA...ZA...LG...LA...FM...ZS...ZM..RFigure 9.12Ordering a list using theQuicksort algorithmEventually all the small sorted piles can be stacked one on top of theother to produce a sorted set of tests. See Figure 9.12.This strategy is based on recursion—on each attempt to sort the stack oftests, the stack is divided, and then the same approach is used to sort eachof the smaller stacks (a smaller case). This process goes on until the smallstacks do not need to be divided further (the base case). The parameter listof theQuicksortalgorithm reflects the part of the list that is currently being
This is the end of the preview.
access the rest of the document.