Cover Data Structures and Algorithms with Object-Oriented Design Patterns in Java
next up previous contents index

Best-Case Running Time

In the best case, the partitioning step divides the remaining elements into two sequences with exactly the same number of elements. For example, suppose that tex2html_wrap_inline68915 for some integer m>0. After removing the pivot tex2html_wrap_inline68919 elements remain. If these are divided evenly, each sequence will have tex2html_wrap_inline68921 elements. In this case Equation gif gives

eqnarray37364


next up previous contents index

Bruno Copyright © 1998 by Bruno R. Preiss, P.Eng. All rights reserved.