Start from complexity analysis and work up to graphs and dynamic programming. Built for coding rounds and technical interviews.
What Are Data Structures and Algorithms
Why the way you store data decides how fast your program runs, and how to start thinking about both.
Time Complexity
Big O, Big Omega, Big Theta and the little-o cousins — every notation used to describe how an algorithm grows, with practice questions along the way.
Space Complexity
Memory has a cost too, and the recursion stack counts even when you never allocate anything.
Recursion Fundamentals
Define a base case, shrink the input, and trust the recursive call to do the rest.
Foundations Quiz
12 questions
Arrays and Strings
How arrays are laid out in memory, which operations are cheap, and the traversal patterns you will reuse everywhere.
Two Pointers Technique
Solve array problems in linear time by walking two indices toward each other instead of using nested loops.
Sliding Window Technique
Maintain a moving range over an array to answer subarray questions in a single pass.
Kadane's Algorithm and Prefix Sum Tricks
Find the best contiguous subarray without checking every one, using a habit of thought you will reuse in dozens of problems.
Arrays & Strings Quiz
8 questions
Linear Search
Check every item one by one. The simplest search there is, and sometimes the only one that works.
Binary Search
Halve the search space every step to find an element in logarithmic time, and recognise the problems that hide a binary search inside them.
Jump Search
Skip ahead in fixed steps, then walk back. A middle ground between linear and binary search.
Interpolation Search
Guess where the value probably is instead of always splitting down the middle.
Exponential & Fibonacci Search
Two ways to find a range first, then search inside it — useful when the array is huge or seeking is expensive.
Bubble Sort
Repeatedly swap neighbours that are out of order until nothing moves.
Selection Sort
Find the smallest item, put it first, repeat. Minimal swaps, but never fast.
Insertion Sort
Build a sorted section one item at a time, exactly how you sort a hand of cards.
Merge Sort
Split in half, sort each half, then zip them together. Guaranteed n log n, every time.
Quick Sort
Pick a pivot, push smaller left and bigger right, then repeat on each side.
Heap Sort
Turn the array into a heap, then repeatedly pull out the largest. O(n log n) guaranteed, with no extra memory.
Counting Sort
Tally how many times each value appears, then rebuild the array. No comparisons at all.
Radix Sort
Sort by the last digit, then the next, and so on. The order appears without a single comparison.
Searching & Sorting Cheat Sheet
Every algorithm side by side, with a decision guide for picking the right one under pressure.
Searching & Sorting Quiz
24 questions
Hash Maps and Sets
Trade memory for near-constant lookups, and learn the handful of patterns that solve a huge share of interview problems.
How a Hash Map Actually Works Inside
Peek under the hood at hash functions, load factor and resizing, and see why the answer is still O(1) on average.
Hashing Quiz
8 questions
String Pattern Matching, From Brute Force Up
Find a word inside a much bigger text, starting from the obvious approach and seeing exactly where it wastes time.
Rolling Hash and the Rabin-Karp Algorithm
Turn a whole substring into one number, update that number in O(1) as the window slides, and compare numbers instead of characters.
The KMP Algorithm
Never re-check a character you have already matched. One precomputed table turns pattern matching into a guaranteed O(n + m).
Manacher's Algorithm for Palindromes
Find the longest palindromic substring in linear time, by reusing palindromes you have already discovered instead of checking each centre from scratch.
Strings Quiz
8 questions
Linked Lists
Nodes connected by pointers, the techniques that make them tractable, and why the dummy head trick removes most edge cases.
Doubly Linked Lists and the LRU Pattern
Add a backward pointer, get O(1) removal from anywhere, and meet the structure behind every LRU cache.
Linked Lists Quiz
8 questions
Stacks and Queues
Two restricted structures whose limitations are exactly what make them useful for nesting, ordering and traversal.
Monotonic Deque and Sliding Window Maximum
Track the maximum of a moving window in O(1) per step, using a deque that only ever shrinks in one direction.
Stacks & Queues Quiz
8 questions
Graphs and Traversal
Represent networks of relationships, then explore them with depth-first and breadth-first search.
Dijkstra & Shortest Paths
BFS finds the fewest edges. When edges have weights, you need something smarter.
Union-Find & Topological Sort
Track connected groups in near-constant time, and order tasks so every prerequisite comes first.
Minimum Spanning Trees: Prim's and Kruskal's
Connect every node as cheaply as possible, using two classic greedy strategies that arrive at the same answer from opposite directions.
Graphs Quiz
18 questions
Dynamic Programming
Recognise overlapping subproblems, cache them, and turn exponential recursion into linear time.
1D DP Patterns: House Robber and Friends
A family of problems where the decision at each step is small, but the pattern quietly powers half the DP questions you will ever see.
Grid DP and the Knapsack Family
Move from a 1D line of decisions to a 2D table, and meet the single most reused DP shape in interviews.
Longest Increasing Subsequence
One problem, two solutions — a clean O(n²) DP and a clever O(n log n) upgrade using binary search where you would least expect it.
String DP: LCS, Edit Distance and Palindromes
Two strings, a 2D table, and the recurrence pattern that solves comparison, transformation and palindrome problems alike.
Dynamic Programming Quiz
13 questions
Tries: Trees Built From Words
Store thousands of words in a tree that shares every common prefix, and get autocomplete almost for free.
Segment Trees for Range Queries
Answer "what is the min, max or sum of this range?" and update a value, both in O(log n), on an array that keeps changing.
Fenwick Trees (Binary Indexed Trees)
The same O(log n) range-sum-with-updates power as a segment tree, in about ten lines, once you learn one bit trick.
Design Problems: Combining Structures on Purpose
The real skill interviews test with "design a ___" questions — picking two structures that cover each other's weaknesses.
Advanced Structures Quiz
10 questions
Foundations Quiz
Foundations · 12 questions
Python Essentials Quiz
Python Essentials · 10 questions
Arrays & Strings Quiz
Arrays & Strings · 8 questions
Searching & Sorting Quiz
Searching & Sorting · 24 questions
Hashing Quiz
Hashing · 8 questions
Strings Quiz
String Algorithms · 8 questions
Linked Lists Quiz
Linked Lists · 8 questions
Stacks & Queues Quiz
Stacks & Queues · 8 questions
Trees Quiz
Trees · 6 questions
Heaps Quiz
Heaps & Priority Queues · 7 questions
Graphs Quiz
Graphs · 18 questions
Greedy & Backtracking Quiz
Greedy & Backtracking · 8 questions
Dynamic Programming Quiz
Dynamic Programming · 13 questions
Bit Manipulation Quiz
Bit Manipulation · 8 questions
Advanced Structures Quiz
Advanced Structures · 10 questions
DSA Final Assessment
Final assessment · 13 questions