Lecture 15: Sorting Some sorting algorithms: O(n^2) algorithms: sort rest of list, insert first into it find maximum in list, swap it with first, resort bubble sort quicksort: take first item in list partition list into items < first and items greater than first construct (first) recur on sub-lists hybrid algorithms: different algorithms have different performance characteristics in different regimes -- have an algorithm that uses appropriate algorithms in different regimes.