skip to primary navigationskip to content

Department of Computer Science and Technology

Algorithms 1

 

Course pages 2023–24

Algorithms 1 & 2

Lecture notes and example sheets

Announcements, Q&A, tick submission

Moodle

Schedule

This is the planned lecture schedule. It will be updated as and when actual lectures deviate from schedule. Slides will be uploaded the night before a lecture.

2. Sorting
Lecture 01 2.1 Insertsort
Lecture 02 2.3 Big-O notation
2.4 The cost of sorting
2.6–2.7 Binary insertsort, selectsort
Lecture 03 2.11 Quicksort
2.9 Mergesort
2.10 Heapsort
Lecture 04 2.14 Faster sorting: couting sort, bucket sort, radix sort
2.13 Stability
Sorting algorithms compared
2.8 Bubblesort
2.12 Median and order statistics using quicksort
Example sheet 1 [pdf]
Compulsory tick: mergesort, due 5 Feb
Optional: sortbound. Why doesn't the Ω(n log n) bound apply to countingsort?
3. Algorithm design
Lecture 05 3.1 Dynamic programming
Lecture 06 Dynamic programming examples
Lecture 07 3.2 Greedy algorithms
First half of example sheet 2 [pdf]
Optional tick: huffman
Compulsory tick: resalloc, due 19 Feb
4. Data structures (intro)
Lecture 08 4.1 Memory and pointers
4.1–4.2 List, tree, stack, queue, dictionary
4.7 Hash tables
4.9 Priority queues
Rest of example sheet 2 [pdf]
5. Graphs and path finding
Lecture 09
5, 5.1 Graphs (14:27)
Lecture 10
5.4 Dikstra's algorithm (15:25) plus proof (24:01)
Lecture 11
Lecture 12
Example sheet 4 [pdf]
Optional tick: bfs-all from ex4.q6
Optional challenge: chatgpt-bfs
Optional assignment: grade-chatgpt
Optional tick: bf-cycle from ex4.q19
6. Graphs and subgraphs
Lecture 13
Lecture 14
Lecture 15
Lecture 16
Example sheet 5 [pdf]
Compulsory tick: max-flow, due 11 March
7. Advanced data structures
Lecture 16 (ctd)
Lecture 17
Lecture 18 4.7 Hash tables revisited
4.8 Binomial heap
Lecture 19
Lecture 20
7.8 (continued)
7.7 Implementing the Fibonacci heap
Lecture 21 Review of amortized analysis
Example sheet 6 [pdf]
Optional tick: dis-set from ex6.q12
Optional tick: fib-heap
4. Data structures (ctd)
Lecture 21 ctd. 4.3 Binary search trees
Lecture 22 4.4 2-3-4 trees
4.6 B-trees
Lecture 23 4.5 Red-black trees
Example sheet 3 [pdf]
Epilog
Lecture 24 What's examinable
Proof by induction / bfs-all challenge