Blind 75 Sheet: Complete Questions, Solutions & Tracker

The Blind 75 is a list of 75 LeetCode problems that cover the patterns coding interviews keep returning to. Here it is in its original groups. Every one of the 75 links to a FaangPrep lesson that steps through the solution visually.

Working through it by pattern rather than in list order usually sticks better: see the patterns cheat sheet for a template per pattern, or the DSA 75 sheet, our own pattern-wise list with a visualizer for every problem. Finished all 75? The NeetCode 150 adds 75 more problems in the same patterns, and Grind 75 is the same author's newer list, laid out week by week.

Every problem below has its key idea and time complexity in one line, so the list doubles as a revision sheet. Tick a problem when you have solved it: your progress is saved in this browser, no account needed.

0 / 75Blind 75 problems solved

Array (10)

  1. Two Sum

    Hash map from value to index; for each number, look up target − number before storing it · O(n)

    Visual solutionLeetCode
  2. Best Time to Buy and Sell Stock

    Track the lowest price so far; the best profit is the largest price − lowest so far · O(n), O(1) space

    Visual solutionLeetCode
  3. Contains Duplicate

    Add each number to a set; a number already in the set is a duplicate · O(n)

    Visual solutionLeetCode
  4. Product of Array Except Self

    Prefix products left to right, then multiply in suffix products right to left; no division · O(n)

    Visual solutionLeetCode
  5. Maximum Subarray

    Kadane: extend the current sum or restart at this element, whichever is larger; keep the best · O(n), O(1) space

    Kadane's algorithm

    Visual solutionLeetCode
  6. Maximum Product Subarray

    Track the largest and smallest product ending here; a negative number swaps them · O(n), O(1) space

    Visual solutionLeetCode
  7. Find Minimum in Rotated Sorted Array

    Binary search: if nums[mid] > nums[right] the minimum is to the right, otherwise at mid or left · O(log n)

    Visual solutionLeetCode
  8. Search in Rotated Sorted Array

    Binary search: one half is always sorted; check whether the target lies in it and keep that half · O(log n)

    Visual solutionLeetCode
  9. 3Sum

    Sort, fix one number, then two pointers on the rest; skip equal values to avoid duplicate triplets · O(n²)

    Visual solutionLeetCode
  10. Container With Most Water

    Pointers at both ends: record the area, then move the shorter side inward · O(n)

    Visual solutionLeetCode

Binary (5)

  1. Sum of Two Integers

    XOR gives the sum without carries, AND shifted left gives the carry; repeat until the carry is 0 · O(32)

    Visual solutionLeetCode
  2. Number of 1 Bits

    Clear the lowest set bit with n & (n − 1) and count how many times · O(set bits)

    Visual solutionLeetCode
  3. Counting Bits

    bits[i] = bits[i >> 1] + (i & 1) · O(n)

    Visual solutionLeetCode
  4. Missing Number

    XOR every index 0..n with every number (or subtract the sum from n(n + 1) / 2) · O(n), O(1) space

    Visual solutionLeetCode
  5. Reverse Bits

    Shift the result left and add the lowest bit of n, 32 times · O(32)

    Visual solutionLeetCode

Dynamic Programming (11)

  1. Climbing Stairs

    ways(n) = ways(n − 1) + ways(n − 2), kept in two variables · O(n), O(1) space

    Visual solutionLeetCode
  2. Coin Change

    dp[a] = 1 + the minimum dp[a − coin] over all coins; unreachable amounts stay infinite · O(amount · coins)

    Visual solutionLeetCode
  3. Longest Increasing Subsequence

    Keep the smallest tail for each length and binary search where each number goes · O(n log n)

    Visual solutionLeetCode
  4. Longest Common Subsequence

    dp[i][j] = dp[i − 1][j − 1] + 1 on a match, else the larger of skipping one character · O(m · n)

    Visual solutionLeetCode
  5. Word Break

    dp[i] is true if some dp[j] is true and s[j..i] is a dictionary word · O(n² · word check)

    Visual solutionLeetCode
  6. Combination Sum IV

    dp[t] = sum of dp[t − num] over all numbers (order matters, so amounts outside, numbers inside) · O(target · n)

    Visual solutionLeetCode
  7. House Robber

    dp[i] = max(dp[i − 1], dp[i − 2] + nums[i]), kept in two variables · O(n), O(1) space

    Visual solutionLeetCode
  8. House Robber II

    The houses form a circle: run House Robber on all but the last and on all but the first; take the larger · O(n)

    Visual solutionLeetCode
  9. Decode Ways

    dp[i] adds dp[i − 1] if the last digit is 1-9 and dp[i − 2] if the last two make 10-26 · O(n), O(1) space

    Visual solutionLeetCode
  10. Unique Paths

    dp[r][c] = dp[r − 1][c] + dp[r][c − 1], or one row reused · O(m · n)

    Visual solutionLeetCode
  11. Jump Game

    Greedy: track the farthest index reachable; fail if you reach an index beyond it · O(n)

    Visual solutionLeetCode

Graph (8)

  1. Clone Graph

    DFS or BFS with a map from each original node to its copy, creating copies on first visit · O(V + E)

    Visual solutionLeetCode
  2. Course Schedule

    Topological sort (Kahn’s BFS on in-degrees or DFS cycle check); possible if no cycle · O(V + E)

    Visual solutionLeetCode
  3. Pacific Atlantic Water Flow

    Search uphill from each ocean’s border cells; the answer is the cells both searches reach · O(m · n)

    Visual solutionLeetCode
  4. Number of Islands

    Scan the grid; each unvisited land cell starts a DFS or BFS that sinks its island, count the starts · O(m · n)

    Visual solutionLeetCode
  5. Longest Consecutive Sequence

    Put numbers in a set; from each number with no predecessor, count up while the next exists · O(n)

    Visual solutionLeetCode
  6. Alien Dictionary

    First differing letter of each adjacent word pair gives an edge; topological sort the letters · O(total letters)

    Visual solutionLeetCode
  7. Graph Valid Tree

    Exactly n − 1 edges and no cycle (union-find), so the graph is connected · O(n · α(n))

    Visual solutionLeetCode
  8. Number of Connected Components in an Undirected Graph

    Union-find over the edges (or DFS); count the distinct roots · O(n + E)

    Visual solutionLeetCode

Interval (5)

  1. Insert Interval

    Copy intervals ending before the new one, merge every overlapping one into it, copy the rest · O(n)

    Visual solutionLeetCode
  2. Merge Intervals

    Sort by start; extend the last merged interval when the next one overlaps, else start a new one · O(n log n)

    Visual solutionLeetCode
  3. Non-overlapping Intervals

    Sort by end; keep every interval that starts at or after the last kept end and remove the rest · O(n log n)

    Visual solutionLeetCode
  4. Meeting Rooms

    Sort by start; any meeting that starts before the previous one ends is a clash · O(n log n)

    Visual solutionLeetCode
  5. Meeting Rooms II

    Sort by start; a min-heap of end times frees a room when the earliest end is at or before the next start · O(n log n)

    Visual solutionLeetCode

Linked List (6)

  1. Reverse Linked List

    Walk the list and point each node back at the previous one · O(n), O(1) space

    Visual solutionLeetCode
  2. Linked List Cycle

    Floyd: slow moves one step, fast two; they meet if and only if there is a cycle · O(n), O(1) space

    Visual solutionLeetCode
  3. Merge Two Sorted Lists

    A dummy head; repeatedly attach the smaller front node, then the leftover list · O(m + n)

    Visual solutionLeetCode
  4. Merge k Sorted Lists

    Min-heap of each list’s head; pop the smallest, push its next · O(N log k)

    Visual solutionLeetCode
  5. Remove Nth Node From End of List

    Move a lead pointer n steps ahead, then move both until the lead ends; unlink the next node · O(n)

    Visual solutionLeetCode
  6. Reorder List

    Find the middle, reverse the second half, then interleave the two halves · O(n), O(1) space

    Visual solutionLeetCode

Matrix (4)

  1. Set Matrix Zeroes

    Use the first row and column as markers (plus two flags for themselves), then clear marked rows and columns · O(m · n), O(1) space

    Visual solutionLeetCode
  2. Spiral Matrix

    Four boundaries: walk right, down, left, up, shrinking the boundary after each side · O(m · n)

    Visual solutionLeetCode
  3. Rotate Image

    Transpose the matrix, then reverse each row · O(n²), in place

    Visual solutionLeetCode
  4. Word Search

    DFS from each cell matching the word, marking the cell used while exploring and restoring it after · O(m · n · 4^L)

    Visual solutionLeetCode

String (10)

  1. Longest Substring Without Repeating Characters

    Sliding window with the last index of each character; jump the left edge past a repeat · O(n)

    Visual solutionLeetCode
  2. Longest Repeating Character Replacement

    Window is valid while length − (count of its most frequent letter) ≤ k; shrink otherwise · O(n)

    Visual solutionLeetCode
  3. Minimum Window Substring

    Expand right until every needed count is met, then shrink left while it stays met; keep the shortest · O(m + n)

    Visual solutionLeetCode
  4. Valid Anagram

    Count letters of one string and subtract the other’s; all counts must end at 0 · O(n)

    Visual solutionLeetCode
  5. Group Anagrams

    Key each word by its sorted letters (or a 26-count tuple) in a hash map · O(n · k log k)

    Visual solutionLeetCode
  6. Valid Parentheses

    Push opening brackets; each closing bracket must match the top of the stack · O(n)

    Visual solutionLeetCode
  7. Valid Palindrome

    Two pointers from both ends, skipping non-alphanumerics and comparing lowercase · O(n)

    Visual solutionLeetCode
  8. Longest Palindromic Substring

    Expand around every centre (one character and between two) and keep the longest · O(n²)

    Visual solutionLeetCode
  9. Palindromic Substrings

    Expand around every centre and count each palindrome found · O(n²)

    Visual solutionLeetCode
  10. Encode and Decode Strings

    Prefix each string with its length and a delimiter, so any characters survive the round trip · O(total length)

    Visual solutionLeetCode

Tree (14)

  1. Maximum Depth of Binary Tree

    Depth is 1 + the larger depth of the two subtrees · O(n)

    Visual solutionLeetCode
  2. Same Tree

    Both null, or equal values with equal left and right subtrees, recursively · O(n)

    Visual solutionLeetCode
  3. Invert Binary Tree

    Swap the left and right child of every node, recursively or with a queue · O(n)

    Visual solutionLeetCode
  4. Binary Tree Maximum Path Sum

    DFS returns the best downward path; at each node update the answer with left + node + right · O(n)

    Visual solutionLeetCode
  5. Binary Tree Level Order Traversal

    BFS with a queue, processing one level (the queue’s size) at a time · O(n)

    Visual solutionLeetCode
  6. Serialize and Deserialize Binary Tree

    Preorder with a marker for null children; rebuild by reading the same order back · O(n)

    Visual solutionLeetCode
  7. Subtree of Another Tree

    At each node of the big tree, check Same Tree against the small one (or compare serializations) · O(m · n)

    Visual solutionLeetCode
  8. Construct Binary Tree from Preorder and Inorder Traversal

    Preorder gives the root; its index in inorder splits left and right subtrees (map for O(1) lookup) · O(n)

    Visual solutionLeetCode
  9. Validate Binary Search Tree

    DFS passing the allowed (low, high) range down to each node · O(n)

    Visual solutionLeetCode
  10. Kth Smallest Element in a BST

    In-order traversal visits values in sorted order; stop at the kth · O(h + k)

    Visual solutionLeetCode
  11. Lowest Common Ancestor of a BST

    From the root, go left if both values are smaller, right if both larger; otherwise this node · O(h)

    via the binary tree version (LeetCode 236), which also solves the BST case

    Visual solutionLeetCode
  12. Implement Trie (Prefix Tree)

    Nodes with child links and an end-of-word flag; insert and search walk one character at a time · O(word length)

    Visual solutionLeetCode
  13. Design Add and Search Words Data Structure

    A trie; search tries every child at a "." with DFS · O(L) add, O(26^dots · L) search

    Visual solutionLeetCode
  14. Word Search II

    Put the words in a trie and DFS from each cell along the trie, pruning finished branches · O(m · n · 4^L)

    Visual solutionLeetCode

Heap (2)

  1. Top K Frequent Elements

    Count with a hash map, then bucket by frequency (or a heap of size k) · O(n)

    Visual solutionLeetCode
  2. Find Median from Data Stream

    A max-heap for the lower half and a min-heap for the upper half, kept balanced · O(log n) add, O(1) median

    Visual solutionLeetCode