learningto/pass

Math for Coding Interviews, Without the Formulas

Every "math wall" that stops people mid-preparation, explained in plain English with a hands-on visual you can click through. Free, no signup. Pick one, or follow 16 topics on the learning path.

Big-O & Complexity

How fast is an algorithm, actually? All the complexity classes, explained without formulas.

O(n) Linear Time, Explained VisuallyIf you have 10 items to check, you do 10 steps. 1,000 items? 1,000 steps. The work grows at exactly the same r...O(1) Constant Time, Explained VisuallyNo matter how large the input is, this operation always takes the same amount of time. The size of n simply do...Logarithms Explained by Cutting in Halflog₂(n) answers this question: if you start with n things and keep cutting the group in half, how many cuts un...O(n²) Quadratic Time, Explained Visuallyn² means n multiplied by itself. If n is 10, that is 100. If n is 100, that is 10,000. If n is 1,000, that is ...O(n log n): Why Merge Sort Beats Bubble Sortn log n sits between n (linear) and n² (quadratic). For n=1000: n=1000, n log n≈10,000, n²=1,000,000. Merge so...Why 2^n Exponential Time Is Too Slow2ⁿ means you start with 1 and double it n times. n=10 gives you 1,024. n=20 gives you 1,048,576. n=30 gives yo...What Is Big-O Notation? (No Formulas)Big-O describes how the number of operations grows as input size n grows. It ignores constants and lower-order...

Data Structure Math

The small bits of math hidden inside arrays, hash tables, trees, and graphs.

Array Index Arithmetic: Pointers as NumbersAn array index is just a number pointing to a position. "left + right" divided by 2 gives the middle position....Linked List Pointers: Following Arrows in MemoryA pointer is just a number that tells you where something else is in memory. "Node.next" means "here is the ad...Stacks vs Queues: LIFO and FIFO, No Math NeededLIFO: Last In, First Out. The most recently added item is the first to leave. FIFO: First In, First Out. The o...Hash Functions: Turning Anything Into a NumberA hash function takes any input (a string, an object, anything) and converts it into a number. The same input ...Binary Tree Height: Why Operations Are O(log n)A balanced binary tree with n levels has about 2ⁿ nodes total. Conversely, if you have n nodes arranged as a b...Graph Theory Basics: Dots and LinesA graph is just dots (called nodes or vertices) connected by lines (called edges). That is it. A social networ...Graph Complexity: Vertices, Edges, and O(V+E)Graph complexity uses two variables: V (vertices = nodes) and E (edges = connections). A graph with V nodes ca...Heap Array Indexing: The 2i+1 and 2i+2 FormulasA heap looks like a tree but is actually stored as a flat array. The math that makes this work: if a node is a...Tries: Strings as Paths Through a TreeIn a trie, each letter of a word is one step down the tree. The word "cat" is stored as: root → c → a → t. The...BFS vs DFS: The Queue vs Stack ChoiceBFS uses a queue (FIFO). It processes nodes in the order they were discovered. This naturally explores all nod...

Algorithm Patterns

Recursion, memoization, DP, greedy, and binary search - the recurring ideas behind the hardest questions.

Probability for Coding Interviews, Explained SimplyProbability is just a fraction between 0 and 1. Something that never happens has probability 0. Something that...Recursion Explained: Functions That Call ThemselvesA recursive function solves a big problem by solving a slightly smaller version of the same problem, and keeps...Binary Search: The Sorted Order GuaranteeBinary search only works because the array is sorted. Sorted order is the invariant - the thing that is always...Decision Trees and Backtracking, Explained VisuallyBacktracking builds a tree of decisions. At each step you have some number of choices (say, k choices). Each c...Memoization: Turn O(2^n) Into O(n)The key insight: if you have already computed a result, store it. If you see the same subproblem again, look u...DP Tables: Filling the Grid, Step by StepBottom-up DP builds a table where each cell depends only on cells you have already filled. You fill the table ...Greedy Algorithms: Local vs Global OptimumA local optimum is the best choice right now. A global optimum is the best choice for the entire problem. Gree...

Arithmetic & Math

Modulo, summation, and powers of ten - the arithmetic that shows up more than you would expect.

Apply it on the learning path