Sorting Quick, Merge & Radix
Divide-and-conquer Technique subproblem 2 of size n/2 subproblem 1 of size n/2 a solution to subproblem 1 a solution to the original problem a solution to subproblem 2 a problem of size n
Best Case If we are lucky, Partition splits the array evenly
Worst Case What is the worst case? One side of the parition has only one element
Worst Case (2)
Merge Sort
Using Divide and Conquer: Mergesort Mergesort Strategy Sorted Merge Sorted Sort recursively by Mergesort first last (first last) 2
Algorithm
Radix Sort
Least-significant-digit-first Example: 275, 087, 426, 061, 509, 170, 677, 503