Quiz: Quicksort the following array in ascending order: 54 27 87 58 35 91 28 95 58 86 76 32 19 Example: 6 5 9 8 3 1 7 p l r decrement r until you find a number <=6 increment l until you find a number >6 6 5 9 8 3 1 7 p l r swap the numbers at l'th and r'th positions 6 5 1 8 3 9 7 p l r 6 5 1 3 8 9 7 p l r Swap p and l, repeat recursively on the subarrays 3 5 1 |6| 8 9 7 l=r -> 3 5 1 p l r decrement r until you find a number <=3 increment l until you find a number > 3 swap l and r 3 1 5 p l r 3 1 5 p l=r Swap p and l 1 |3| 5 -> 8 9 7 p l r no increment or decrement needed Swap l and r 8 7 9 p l r 8 7 9 p l=r Swap p and l 7 |8| 9 -> Sorted array: 1 |3| 5 |6| 7 |8| 9