we telescopeusing equation ( repeatedly thust( ( ( ( ( ( ( ( ( ( ( ( adding up all these equations yields (nt( ( ( = as claimed earlier to see that this is the worst possible casenote that the total cost of all the partitions in recursive calls at depth must be at most since the recursion depth is at most nthis gives an ( worst-case bound for quicksort best-case analysis in the best casethe pivot is in the middle to simplify the mathwe assume that the two subarrays are each exactly half the size of the originaland although this gives slight overestimatethis is acceptable because we are only interested in big-oh answer ( ( / cn ( divide both sides of equation ( by (nt( / + / ( we will telescope using this equationt( / ( / + / / ( / ( / + / / ( ( + ( ( ( we add all the equations from ( to ( and note that there are log of themt(nt( log ( which yields (ncn log ( log ( notice that this is the exact same analysis as mergesorthencewe get the same answer that this is the best case is implied by results in section