Files
leetcode/README.md
T

43 KiB
Raw Blame History

header

follow badge

Campaign

8-week interview-prep fight camp. Each phase is a milestone; each topic an issue; each problem a sub-issue. Core count reflects closed sub-issues.

Phase Wk Date Topic Core Core problems
I
Linear Structures
1Mon Aug 1701 · Hash-Based Lookup5/5217 · 242 · 1 · 49 · 347
1Tue Aug 1802 · Prefix Sum3/3303 · 238 · 560
2Mon Aug 2403 · Two Pointers2/4125 · 167 · 15 · 11
2Tue Aug 2504 · Sliding Window1/4121 · 3 · 424 · 567
2Wed Aug 2605 · Binary Search3/5704 · 875 · 33 · 74 · 153
2Thu Aug 2706 · Stack0/320 · 155 · 150
2Fri Aug 2807 · Monotonic Stack0/2739 · 853
II
Nodal & Grid
3Mon Aug 3108 · Linked List0/3206 · 21 · 141
3Tue Sep 109 · Hybrid Structures0/2146 · 2
3Wed Sep 210 · Matrix Index Math0/348 · 54 · 73
III
Hierarchical
3Thu Sep 311 · Tree DFS0/3226 · 104 · 236
3Fri Sep 412 · Tree BFS0/3102 · 199 · 1448
4Mon Sep 713 · Binary Search Tree0/398 · 230 · 235
4Tue Sep 814 · Heap / Priority Queue0/3215 · 973 · 23
4Wed Sep 915 · Trie0/2208 · 211
IV
Relational
4Thu Sep 1016 · Graph DFS0/3200 · 133 · 417
4Fri Sep 1117 · Graph BFS0/2994 · 127
5Mon Sep 1418 · Topological Sort0/2207 · 210
5Tue Sep 1519 · Union-Find0/2684 · 323
V
Decision Space
5Wed Sep 1620 · Backtracking0/378 · 39 · 46
5Thu Sep 1721 · 1-D Dynamic Programming0/370 · 198 · 322
5Fri Sep 1822 · Multi-D / Grid DP0/362 · 64 · 1143
6Mon Sep 2123 · Greedy0/353 · 55 · 134
6Tue Sep 2224 · Intervals0/357 · 56 · 435

Phase I — Linear Structures (Week 1)

Topic Set LC # Problem
1. Hash-Based Lookup
builds on nothing
A217Contains Duplicate
A242Valid Anagram
A1Two Sum
A49Group Anagrams
A347Top K Frequent Elements
B383Ransom Note
B205Isomorphic Strings
B128Longest Consecutive Sequence
B290Word Pattern
2. Prefix Sum
builds on 1
A303Range Sum Query
A238Product of Array Except Self
A560Subarray Sum Equals K
B525Contiguous Array
B974Subarray Sums Divisible by K
3. Two Pointers
builds on ordered iteration
A125Valid Palindrome
A167Two Sum II
A153Sum
A11Container With Most Water
A42Trapping Rain Water
B392Is Subsequence
B977Squares of a Sorted Array
B189Rotate Array
B80Remove Duplicates II
4. Sliding Window
builds on 3
A121Best Time to Buy and Sell Stock
A3Longest Substring Without Repeating Characters
A424Longest Repeating Character Replacement
A567Permutation in String
A76Minimum Window Substring
B209Minimum Size Subarray Sum
B1004Max Consecutive Ones III
B643Maximum Average Subarray
5. Binary Search
builds on ordered / monotonic invariants
A704Binary Search
A74Search a 2D Matrix
A875Koko Eating Bananas
A33Search in Rotated Sorted Array
A153Find Minimum in Rotated Sorted Array
B35Search Insert Position
B162Find Peak Element
B34First & Last Position
B 4Median of Two Sorted Arrays
6. Stack
independent primitive
A20Valid Parentheses
A155Min Stack
A150Evaluate Reverse Polish Notation
B71Simplify Path
B 224Basic Calculator
7. Monotonic Stack
builds on 6
A739Daily Temperatures
A853Car Fleet
B496Next Greater Element I
B901Online Stock Span
B 84Largest Rectangle in Histogram
---

Phase II — Nodal & Grid Structures (Week 2)

Topic Set LC # Problem
8. Linked List
independent primitive
A206Reverse Linked List
A21Merge Two Sorted Lists
A141Linked List Cycle
A19Remove Nth Node From End
A143Reorder List
B876Middle of the Linked List
B92Reverse Linked List II
B82Remove Duplicates from Sorted List II
B61Rotate List
B86Partition List
9. Hybrid Structures
builds on 1 + 8
A146LRU Cache
A2Add Two Numbers
B138Copy List with Random Pointer
B380Insert Delete GetRandom O(1)
10. Matrix Index Math
builds on 3 — NOT graph traversal
A48Rotate Image
A54Spiral Matrix
A73Set Matrix Zeroes
B36Valid Sudoku
B289Game of Life
---

Phase III — Hierarchical Structures (Week 3)

Topic Set LC # Problem
11. Tree DFS
builds on recursion
A226Invert Binary Tree
A104Maximum Depth of Binary Tree
A100Same Tree
A572Subtree of Another Tree
A236Lowest Common Ancestor
A 124Binary Tree Maximum Path Sum
B101Symmetric Tree
B112Path Sum
B129Sum Root to Leaf Numbers
B543Diameter of Binary Tree
12. Tree BFS
builds on 6's sibling (queue) + 11
A102Level Order Traversal
A199Right Side View
A1448Count Good Nodes
B103Zigzag Level Order
B637Average of Levels
13. Binary Search Tree
builds on 5 + 11
A98Validate BST
A230Kth Smallest in BST
A235LCA of BST
A105Build from Preorder + Inorder
B530Minimum Absolute Difference
B173BST Iterator
B108Sorted Array to BST
14. Heap / Priority Queue
implicit tree over array
A215Kth Largest in Array
A703Kth Largest in Stream
A973K Closest Points
A621Task Scheduler
A23Merge K Sorted Lists
B1046Last Stone Weight
B373K Pairs with Smallest Sums
B 295Find Median from Data Stream
B 502IPO
15. Trie
builds on 11
A208Implement Trie
A211Add & Search Words
B212Word Search II (needs topic 20 — schedule after)
---

Phase IV — Relational Structures (Week 4)

Topic Set LC # Problem
16. Graph DFS
builds on 11 + visited set
A200Number of Islands
A695Max Area of Island
A133Clone Graph
A417Pacific Atlantic Water Flow
A130Surrounded Regions
B399Evaluate Division
B261Graph Valid Tree
17. Graph BFS
builds on 12 + visited set — shortest path unweighted
A994Rotting Oranges
A127Word Ladder
B909Snakes and Ladders
B433Minimum Genetic Mutation
B286Walls and Gates
18. Topological Sort
builds on 16
A207Course Schedule
A210Course Schedule II
B 269Alien Dictionary
B1462Course Schedule IV
19. Union-Find
builds on 16's problem class
A684Redundant Connection
A323Number of Connected Components
B128Longest Consecutive (union-find variant)
B721Accounts Merge
---

Phase V — Decision-Space Exploration (Weeks 45)

Topic Set LC # Problem
20. Backtracking
builds on 16 — then unlock LC 212 from topic 15
A78Subsets
A39Combination Sum
A46Permutations
A79Word Search
B17Letter Combinations
B77Combinations
B22Generate Parentheses
B 52N-Queens II
21. 1-D Dynamic Programming
builds on 20
A70Climbing Stairs
A746Min Cost Climbing Stairs
A198House Robber
A213House Robber II
A322Coin Change
A300Longest Increasing Subsequence
B139Word Break
B91Decode Ways
B647Palindromic Substrings
22. Multi-D / Grid DP
builds on 21
A62Unique Paths
A64Minimum Path Sum
A1143Longest Common Subsequence
B120Triangle
B63Unique Paths II
B 72Edit Distance
B221Maximal Square
B 97Interleaving String
23. Greedy
builds on 21 — includes Kadane's
A53Maximum Subarray
A55Jump Game
A45Jump Game II
A134Gas Station
B122Best Time to Buy and Sell Stock II
B918Maximum Sum Circular Subarray
B763Partition Labels
24. Intervals
builds on 23
A57Insert Interval
A56Merge Intervals
A435Non-Overlapping Intervals
A253Meeting Rooms II
B228Summary Ranges
B452Minimum Arrows to Burst Balloons
B252Meeting Rooms I