ADS2 Arcade Algorithms and Data Structures II · 2026/27
Small games for practising the algorithms from the lecture. Notation follows the ALG book. Personal bests are saved in your browser only.
Strings
Failure Function Sprint
Compute the failure array Z of tricky needles. How many can you get right in 90 seconds?
Where Do I Fail?
Click where the failure and shortcut edges of a trie go. The automaton grows as you answer.
Rolling Hash
Watch the window roll, compute hash updates against the clock, and craft evil haystacks full of spurious hits.
KMP Playground
Step through KMP search and the construction of Z on your own strings.
Aho–Corasick Playground
Step through AcSearch and AcBuild with your own set of needles.
Flows
Augment!
Find augmenting paths in the residual network, then prove your flow is maximum with a cut. Also has a Dinic mode with layered networks and blocking flows (ALG 14.4).
Thesis Match
Match students to thesis topics by finding alternating paths, watch the same augmenting path in the flow network, then prove your matching is maximum with a cut.
Downhill
Push excess downhill and raise vertices when stuck. Heights are positions on the screen.
Parallel algorithms
Comparator Lab
Build sorting networks by hand. Can you match the proven optimum: 19 comparators for n = 8?
Carry Lookahead
Compute block behaviors 0 / 1 / < up the tree and carries back down: add two numbers in Θ(log n) rounds instead of n.
Geometry
Algebraic algorithms
Hard problems
One per Triangle
Satisfy the formula or pick one vertex per triangle, and watch the reduction translate your answer. Spot the unsatisfiable ones.
Good Enough
Beat the 2-approximation for the traveling salesman, then pack a knapsack against ApproxKnapsack, and see on your own instance why the guarantees hold.