Patterns
500 problems in 22 patterns. Each pattern's page says what it is and lists its problems, with the videos and the AI rounds.
Recursion and DP
- Dynamic ProgrammingBreak a problem into smaller overlapping subproblems, solve each once and reuse the answers.64 problems · 24 videos · 5 AI rounds
- GreedyAt each step take the choice that looks best right now, and rely on an argument that it never hurts the final answer.15 problems · 4 videos · 3 AI rounds
- BacktrackingBuild an answer one choice at a time, and undo the last choice when it leads nowhere.20 problems · 5 videos · 3 AI rounds
- RecursionDefine the answer in terms of the same problem on a smaller input, with a base case that stops the descent.9 problems · 3 AI rounds
Arrays and searching
- Prefix SumPrecompute running totals so the sum of any range is a single subtraction.15 problems · 6 videos · 3 AI rounds
- Arrays & HashingStore what you have already seen in a hash map or set, so each lookup takes constant time instead of a rescan.22 problems · 16 videos · 3 AI rounds
- SortingSort the data, or a key built from each item, so related items end up side by side or in a known order.15 problems · 6 videos · 3 AI rounds
- Binary SearchHalve the search range at every step by asking a question whose answer tells you which half to keep.23 problems · 12 videos · 4 AI rounds
- Sliding WindowKeep a window over part of an array or string, and move its edges instead of starting over each time.27 problems · 11 videos · 4 AI rounds
- IntervalsSort ranges by start (or end) time, then sweep through them, merging or counting overlaps as you go.15 problems · 4 videos · 3 AI rounds
- Two PointersWalk two indices through the data, usually from both ends or at different speeds, and decide which one to move at each step.53 problems · 30 videos · 6 AI rounds
Trees and graphs
- TreesProcess a tree by solving each subtree and combining the results, using recursion for depth or a queue for levels.38 problems · 19 videos · 3 AI rounds
- TriesStore words in a tree with one letter per edge, so words that share a prefix share a path.15 problems · 2 videos · 3 AI rounds
- Advanced graphsGo beyond plain traversal with ordering, weights or constraints: topological sort, shortest paths with Dijkstra, and minimum spanning trees.14 problems · 1 video · 3 AI rounds
- GraphsModel cells, people or words as nodes and their connections as edges, then explore with breadth-first or depth-first search.29 problems · 5 videos · 3 AI rounds
- Heap / Priority QueueKeep a heap so the smallest or largest item is always ready to take in logarithmic time.15 problems · 4 videos · 3 AI rounds
Structures
- Advanced data structures and stringsTackle harder string and counting problems with tools like rolling hashes, string matching and merge sort or tree-based counting.13 problems · 1 video · 3 AI rounds
- Stack & QueueUse a stack to remember the most recent unfinished thing, or a queue to handle things in arrival order.28 problems · 6 videos · 3 AI rounds
- Linked ListWork with nodes by rewiring their next pointers, often with a dummy head or a fast and slow pointer.15 problems · 10 videos · 5 AI rounds
- DesignCombine data structures so that every operation of a small class meets its time target.24 problems · 8 videos · 3 AI rounds
Maths and bits
Sort by what interviews ask
Sign in to see how many companies ask each problem, sort all 500 by it or by likes, and tick off what you solve.