Lectures are Wednesday 13-15 and Friday 13-15, normally in room EL41. For the full schedule see TimeEdit.
Lecture notes will appear here around the time of the lecture.
-
Wednesday 19th 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 21st March: complexity (Weiss chapter 5). We got a bit stuck in the middle so the lecture ends suddenly; we’ll finish it next time. Reading: Weiss chapter 5 (algorithm analysis).
-
Wednesday 26th March: more complexity, sorting (if time). (Very) extra reading: Finite calculus: a tutorial for solving nasty sums.
-
Friday 28th March: finish sorting from previous lecture, more sorting. Code: sorting algorithms in Haskell. Reading: Weiss 8.1-8.3, 8.5-8.6 (sorting).
-
Wednesday 2nd April: real-world sorting, complexity of recursive functions. Reading: Weiss 7.5 (divide and conquer).
-
Friday 4th 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.
-
Wednesday 9th April: priority queues, trees. 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.
-
Friday 11th April: binary heaps, leftist heaps. Reading: Weiss new international edition 20.3-20.5 (binary heaps). In other editions: 21.3-21.5.
-
Wednesday 30th April: No lecture because of Valborg.
-
Friday 2nd May: 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 7th 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 9th May: linked lists, hash tables. Reading: Weiss new international edition 6.5, 16, 19.1-19.3, 19.5-19.6. In other editions: 6.5, 17, 20.1-20.3, 20.5-20.6.
-
Wednesday 14th May: graphs. Reading: Weiss new international edition 13. In other editions: 14.
-
Friday 16th May: Dijkstra’s algorithm, Prim’s algorithm.
-
Wednesday 21st May, tail recursion, summing up and the exam.
-
Friday 23rd May: no lecture!