Oct 5, Mathematica lecture notes * Questions / discussion of work status * go over Quicksort algorithm : (1) Work on part of the list, from left .. right (both indeces). (2) Pick a pivot, left <= pivot <= right (3) Re-order the list so that the pivot is in the correct spot : (a) move the pivot to the far right (b) store a "wherePivotGoes" index at the far left (c) loop through the list looking for things smaller than the pivot. For each smaller than the pivot, * put it at "wherePivotGoes", * increment "wherePivotGoes" (d) finally, swap the pivot to its correct place (4) repeat recursively on the left and right parts of the list * See code/quick_sort.nb for some Mathematica code, including an animation (!) * Recursion : fractals natural language trees (real ones and searches) * Keeping a list ordered by adding elements one by one to a binary tree * looping over a tree * depth first * breadth first