Two-Dimensional Grids
CCC Junior J4–J5, with a Senior S2 extension. Grids as maps: coordinates, reading input, scanning, neighbours, counting, simulating, and tracing paths.
Open the concept page → 🐌 Practice — Two Real CCC Problems CCC 2026 J4 Snail Path and CCC 2023 J4 Trianglane, demonstrated step by step from the logic up: translate the story → find the counting idea → walk the official sample → code — then predict-and-reveal exercises for students.
Open the practice page →
Recursion & Backtracking
Functions that call themselves: the call stack, counting branches, choose–explore–undo, subsets with pruning, grid paths — and what “visited” really means.
Open the concept page → ✏️ Practice — Six Past CCC Problems CCC Word Hunt (2023 J5), Pi Day (2015 J5), Rule of Three (2019 J5), Fractals (2004 J5), Harvest Waterloo (2024 J5) and Escape Room (2020 J5/S2) — each with a logic plan, a step-by-step simulation of the official sample, full code, and predict-first exercises. Rule of Three also has a plain-language decode of its input and output.
Open the practice page →
Searching
Find things the smart way: scan in original order, generate-and-check candidates, binary search on sorted data, first-at-least boundary search — and searching a space that is not a list at all.
Open the concept page → ✏️ Practice — Eight Searching Problems Five tiny starters, then the lesson's eight practice questions — lost ticket, digit code, overlapping messages, locker queries, next shuttle, mirror badge, rotating code, class handouts — each animated on its sample with full code.
🔒 Code-locked: type the class code your teacher gives you to open it.
Open the practice page →
DFS & Connected Components
Start with the language of graphs — vertices, edges, paths, and the three ways to store a graph — then go deep first: one stack, mark the moment you push, and a single visited set maps out whole connected regions.
🔒 Code-locked: type the class code your teacher gives you to open it.
Open the graph theory page → 🕸️ Concepts 2 — See How DFS Works The dfs_graph template walked through on a live graph (stack, seen set, mark-on-push), the components scan that reuses one visited set, grid flood fill with visit order, and the scan-all-regions pattern that counts zones and finds the largest.
🔒 Code-locked: type the class code your teacher gives you to open it.
Open the concept page → ✏️ Practice — Five DFS Problems Cable inspection on a graph, a museum floor flood, greenhouse zones, orchard district totals, and the habitat bridge — each animated step by step on its sample with full code.
🔒 Code-locked: type the class code your teacher gives you to open it.
Open the practice page →
Graphs & BFS
Layer by layer with a queue: a distance is an edge count, and the first time BFS reaches a place is the fastest way there — shortest paths on graphs and on grids.
🔒 Code-locked: type the class code your teacher gives you to open it.
Open the concept page → ✏️ Practice — Five BFS Problems A one-way signal relay, festival shuttle rides, library couriers on a grid, a two-source emergency broadcast, and portal delivery by number jumps — each animated on its sample with full code.
🔒 Code-locked: type the class code your teacher gives you to open it.
Open the practice page →
Greedy Algorithms
Sort, take the best local choice, and never look back — the real skill is checking the conditions that make greedy safe.
🔒 Code-locked: type the class code your teacher gives you to open it.
Open the concept page → ✏️ Practice — Five Greedy Problems Maker fair badges on a budget, sorting parcel bins, ferry pairs, club room bookings, and deadline delivery bonuses — each animated on its sample with full code.
🔒 Code-locked: type the class code your teacher gives you to open it.
Open the practice page →
Question Bank — worked solutions, one question per page
Worked solutions open step by step: question first, the idea, the sample walked through, then the code. Pages marked 🔒 ask for the class code your teacher gives you; the rest are open.
Open the worked solution → 🔺2023 J4/S1 · TrianglaneTape around wet triangles: count generously, then subtract shared sides — even columns only.
Open the worked solution → 📚2021 J4 · Arranging BooksMinimum swaps for L-M-S: zones, direct pairs, and 3-cycles.
Open the worked solution → ⚾2017 S1 · Sum GameTwo lists of daily runs: compare running totals, keep the LAST tied day.
Open the worked solution → 🐌2026 J4 · Snail PathOne square at a time, a set of slimy squares, count the re-entries.
Open the worked solution → 🎤2004 S2 · TopYodellerCumulative scores and shared ranks — and the winner's worst rank ever.
Open the worked solution → 🔒2015 J2 · Happy or SadCount :-) and :-( in a message — a substring scan with a three-way verdict.
Code-locked — type the class code your teacher gives you.
Open (code needed) → 🔒2016 J3 · Hidden PalindromeTry every substring, keep the longest palindrome hiding in the word.
Code-locked — type the class code your teacher gives you.
Open (code needed) → 🔒2017 J4 · Favourite TimesClock times whose digits form an arithmetic sequence — search a whole cycle, then repeat it.
Code-locked — type the class code your teacher gives you.
Open (code needed) → 🔒2020 J4 · Cyclic ShiftsRotate the string every possible way and test whether a rotation hides in the text.
Code-locked — type the class code your teacher gives you.
Open (code needed) → 🔒2013 J5/S3 · Chances of WinningA four-team round robin: play out every remaining outcome and find the favourite's title chances.
Code-locked — type the class code your teacher gives you.
Open (code needed) → 🔒2011 J5 · UnfriendMark leaves the network — who is still connected to whom? Groups on a friendship graph.
Code-locked — type the class code your teacher gives you.
Open (code needed) → 🔒2018 J5 · Choose Your Own PathA book of choices: BFS checks every page can be reached and finds the shortest story — count pages, not edges.
Code-locked — type the class code your teacher gives you.
Open (code needed) → 🔒2013 J4 · Time on TaskChores against the clock: shortest first — the cheapest-first greedy template wearing a chore list.
Code-locked — type the class code your teacher gives you.
Open (code needed) → 🔒2017 S2 · High Tide, Low TideSort, split the halves, then zip falling lows with rising highs to rebuild the lost measurement order.
Code-locked — type the class code your teacher gives you.
Open (code needed) → 🔒2015 S3 · GatesEvery plane takes the largest free gate it is allowed — park one plane wrong and the airport closes early.
Code-locked — type the class code your teacher gives you.
Open (code needed) → 🔤2023 J5 · Word HuntWorked solution with animation — inside the Lesson 8 practice page (Problem 1).
Jump to the worked solution → 🥧2015 J5 · Pi DayWorked solution with animation — inside the Lesson 8 practice page (Problem 2).
Jump to the worked solution → 🔀2019 J5 · Rule of ThreeWorked solution with animation — inside the Lesson 8 practice page (Problem 3).
Jump to the worked solution → 🌾2024 J5 · Harvest WaterlooWorked solution with animation — inside the Lesson 8 practice page (Problem 5).
Jump to the worked solution → 🚪2020 J5/S2 · Escape RoomWorked solution with animation — inside the Lesson 8 practice page (Problem 6).
Jump to the worked solution →
Coming next
Each new lesson gets one block like the one above — a concept page and a practice page, added here. This front door never changes; everything behind it can grow.
index.html front door. Students only ever need this single page — every lesson is two clicks away, and every lesson page has a ⌂ Course Home button at the top that brings you back here.