Lectures are Wednesday 13-15 and Friday 13-15, normally in room EL41. Exceptions are marked in bold on the list below. For the full schedule see TimeEdit.
Lecture notes will appear here around the time of the lecture. I will try to put up topics and chapter numbers in advance, but they are liable to change!
-
Wednesday 25th March: introduction, dynamic arrays, binary search. Code used in the lecture: CopyString.java, CopyStringBuilder.java, CopyNaive.java, Copy100.java, CopyDouble.java. Sample input: War and Peace (run with e.g. java CopyDouble < pg2600.txt). Reading: Weiss 2.4.2-2.4.3 (dynamic arrays), 5.6 (binary search).
-
Friday 27th March: complexity (Weiss chapter 5). Reading: Weiss chapter 5 (algorithm analysis). (Very) extra reading: Finite calculus: a tutorial for solving nasty sums.
-
Wednesday 1st April: sorting. Code: sorting algorithms in Haskell. Reading: Weiss 8.1-8.3, 8.5 (sorting).
-
Wednesday 22nd April: quicksort, complexity of recursive functions. Reading: Weiss 8.6 (quicksort), Weiss 7.5 (divide and conquer).
-
Friday 24th April: real-world sorting, counting sort, radix sort.
-
Wednesday 29th April: stacks, queues and deques. Code: queues in Haskell, matching brackets in Haskell. Reading: Weiss new international edition 6.6 (collection API — stacks and queues), 15.1 (implementing stacks and queues using arrays), 15.5 (deques). In other editions: 6.6, 16.1, 16.5.
-
Tuesday 5th May: priority queues, trees, data structure design, room EL43. Reading: Weiss new international edition 6.9 (priority queues), 17 (trees), 20.1-20.2 (binary heaps). In other editions: 6.9, 18, 21.1-21.2.
-
Wednesday 6th May: binary heaps, leftist heaps. Reading: Weiss new international edition 20.3-20.5 (binary heaps). In other editions: 21.3-21.5.
-
Monday 11th May, 10AM: binary search trees, AVL trees. Reading: Weiss new international edition 18.1-18.4 (binary search trees, AVL trees). In other editions: 19.1-19.4.
-
Wednesday 13th May: red-black trees, 2-3 trees, B-trees. Reading: Weiss new international edition 18.5, 18.8 (red-black trees, B-trees). In other editions: 19.5, 19.8.
-
Friday 22nd May: graphs. Reading: Weiss new international edition 13. In other editions: 14.
-
Monday 25th May, 10AM: Dijkstra’s algorithm, Prim’s algorithm.
-
Wednesday 27th May: hash tables, tail recursion. Reading: Weiss new international edition 19.1-19.3, 19.5-19.6. In other editions: 20.1-20.3, 20.5-20.6. Extra: A nice page about different hashing algorithms.
-
Friday 29th May: summing up and the exam.