Most coding rounds reuse a small set of ideas. Two pointers, a sliding window, a monotonic stack, binary search on the answer and a few more cover most of what you will be asked. This course teaches the 23 patterns behind them, one session each, so you recognise the pattern instead of memorising answers.
Every session starts with a story anyone can follow, then a diagram, a step-by-step trace and a template you can reuse. It ends with problems from easy to hard, common mistakes and the signals that tell you this pattern fits.
It comes with the coding practice tracker. Take the placement quiz to find your level, read the pattern guides, then solve problems by pattern while the tracker brings back the ones you should solve again so they stay solved.
What is inside this course
- 23 patterns, one session each, with diagrams and traces
- A reusable template for every pattern
- The coding practice tracker with spaced re-solving
- The placement quiz and pattern guides
- Problems from easy to hard for every pattern
Who it is for
Anyone preparing for coding interviews who wants patterns, not memorised answers.
What you will be able to do
- Recognise the 23 core patterns
- Write a reusable template for each
- Solve new problems by pattern
Syllabus, start to finish
5 modules, 23 chapters.
1Arrays and strings6
- Two PointersImagine a long line of children sorted from the shortest to the tallest.
- Sliding WindowYou are on a train and look through a window frame.
- Prefix SumYou keep coins in a long row of piggy banks.
- Hash MapAt a cinema cloakroom you hand over your coat and get a numbered ticket.
- Cyclic SortFive children wear jerseys numbered 1 to 5.
- Matrix ManipulationA chocolate bar is a grid of squares.
2Linked lists and searching5
- Fast and Slow PointersTwo children run on a track.
- Reversing a Linked ListA line of children, each holding the hand of the child in front.
- Binary SearchI think of a number between 1 and 100.
- Monotonic StackChildren stand in a line for a class photo.
- Overlapping IntervalsEvery child has a play slot, Asha 1pm–3pm, Ravi 2pm–6pm, Mei 8pm–10pm.
3Trees and graphs4
- Breadth-First Search (BFS)Drop a stone into a pond.
- Depth-First Search (DFS)You are in a maze holding a ball of string.
- TreesA family tree has one grandparent at the top, children below, grandchildren below them.
- GraphsPicture a playground.
4Recursion and optimisation4
- BacktrackingYou are choosing an outfit, a shirt, then trousers, then shoes.
- GreedyYou must pay 63 rupees and want to use as few coins as possible.
- Dynamic ProgrammingYou are climbing a staircase and you can take 1 or 2 steps at a time.
- Bitwise XORThink of a light switch.
5Heaps and design4
- Top K ElementsA talent show must pick the 3 best singers from 1,000 contestants.
- K-way MergeThere are three queues of children, and each queue is already sorted by height (short at the front).
- Two HeapsChildren arrive one at a time and you must always be able to say who is standing in the exact middle when they are sorted by height.
- Design Data StructuresYou are building your own toy box with special rules, such as, "the toy I played with last is the easiest to grab, and when the box is full the toy I haven't touched f...