O, Omega, Theta, little-o and little-omega with their constants, limit test and properties; the growth ladder with logs, powers, exponentials and factorials; comparing functions by logarithms; counting loop iterations exactly; worst, best and average case; space and recursion stack; recurrences by substitution, recursion tree and the master theorem with its cases and its limits.
3 sheetsALG-02ALG-03ALG-04
Linear search counts, binary search with exact probe counts, first and last occurrence, lower and upper bound, rotated sorted arrays, interpolation and ternary search, and the comparison lower bound for searching.
1 sheetALG-05
Insertion, selection and bubble sort with exact comparisons and swaps, inversions, merge sort, quicksort with Lomuto and Hoare partitions and pivot cases, heap sort, counting, radix and bucket sort, the n log n comparison lower bound and a master comparison table.
4 sheetsALG-06ALG-07ALG-08
Division and multiplication hash functions, simple uniform hashing, chaining with load factor and expected costs, open addressing with linear, quadratic and double hashing, primary and secondary clustering, expected probes, deletion with tombstones and full insertion traces.
2 sheetsALG-10ALG-11
The divide, conquer and combine pattern and its recurrences: binary search, merge sort, quicksort, maximum and minimum in 3n/2 - 2 comparisons, fast exponentiation, Karatsuba and Strassen counts, inversion counting, maximum subarray and closest pair.
1 sheetALG-12
Greedy choice and optimal substructure with exchange arguments; activity selection, fractional knapsack, job sequencing with deadlines, Huffman coding with average code length, optimal merge pattern, and counterexamples where greedy fails.
2 sheetsALG-13ALG-14
Overlapping subproblems and optimal substructure, memoisation and tabulation; LCS, edit distance, 0/1 knapsack, subset sum, coin change counting and minimum coins, matrix-chain multiplication and longest increasing subsequence, each with its table, fill order and cost.
3 sheetsALG-15ALG-16ALG-17
BFS and DFS on adjacency lists and matrices, BFS levels, DFS discovery and finish times, edge classification, topological sort, connected and strongly connected components, cycle detection, bipartite testing, articulation points and bridges.
2 sheetsALG-18ALG-19
Cut and cycle properties, Kruskal with union-find, Prim with a priority queue, uniqueness conditions, effect of changing weights, counting spanning trees and how an MST differs from a shortest-path tree.
1 sheetALG-20
Relaxation, Dijkstra and why negative edges break it, Bellman-Ford with negative-cycle detection, shortest and longest paths in a DAG, Floyd-Warshall, BFS for unweighted graphs and a complexity table by representation and data structure.
2 sheetsALG-21ALG-22
The wrong turns that cost marks, recognition cues and routines for each question pattern, and a last-day sheet of bounds, counts and checks.
3 sheetsALG-23ALG-24ALG-25