LeetCode Interview Prep
Progress¶
LeetCode Top Easy¶
(17 days) 2026-04-06 -> 2026-04-22
Problems [48/48]
——— Array ———
- 26. Remove Duplicates from Sorted Array
- 122. Best Time to Buy and Sell Stock II
- 189. Rotate Array
- 217. Contains Duplicate
- 136. Single Number
- 350. Intersection of Two Arrays II
- 66. Plus One
- 283. Move Zeroes
- 1. Two Sum
- 36. Valid Sudoku
- 48. Rotate Image
——— Strings ———
- 344. Reverse String
- 7. Reverse Integer
- 387. First Unique Character in a String
- 242. Valid Anagram
- 125. Valid Palindrome
- 8. String to Integer (atoi)
- 28. Find the Index of the First Occurrence in a String
- 14. Longest Common Prefix
——— Linked List ———
- 237. Delete Node in a Linked List
- 19. Remove Nth Node From End of List
- 206. Reverse Linked List
- 21. Merge Two Sorted Lists
- 234. Palindrome Linked List
- 141. Linked List Cycle
——— Trees ———
- 104. Maximum Depth of Binary Tree
- 98. Validate Binary Search Tree
- 101. Symmetric Tree
- 102. Binary Tree Level Order Traversal
- 108. Convert Sorted Array to Binary Search Tree
——— Sorting and Searching ———
——— Dynamic Programming ———
——— Design ———
——— Math ———
——— Others ———
Lessons
2026-04-07
- Read the questions and conditions carefully.
- Find the solution on paper. If you don't find it on paper, odds are you won't implement it correctly on a computer.
- Find the trick. There's always one. When you find it, the solution becomes simple and classic.
2026-04-11
- Draw.
- Try different visual representations.
- They help you see and find patterns.
- They help you think about the right data structures to use.
- Run the algorithm by hand with visuals and small values.
- Re-state or reformulate the problem.
2026-04-14
- Check your tests. When they fail, maybe some test cases are wrong and your implementation is right.
- Check your helpers. Make sure the helpers you use in your tests to build data structures like lists, trees, ... are correct. Your tests may be failing because those helpers are wrong.
2026-04-15
- Group or isolate elements. When you're reasoning about a "set"
of something—it can be a tuple, list, set, tree, ...—change the way
you look at it. You can look at its elements one by one, or see
them as subsets. For instance, if
x = [1, 2, 3, 4, 5], you can look at1, or any other element, or look at it like this:x = [A | B]whereA = [1, 2]andB = [3, 4, 5]. See problem 189. Rotate Array for instance.
2026-04-19
- Learn the trick. Sometimes the solution, especially because of
time and space constraints, uses a property of the system or a
specific algorithm you've never seen before. Chances are you won't
find it in limited time. That's ok. Don't take it personally.
After trying your best, just learn the trick and add it to your
toolkit. For instance, in 136. Single Number, you can get a program
with \(O(1)\) space by keeping in mind the equalities
a ^ a = 0anda ^ 0 = afor any integera, and the fact that XOR is commutative and associative. - Never forget you're doing an interview. A solution for an interview must please the interviewer and show what the interviewer expects, not the most idiomatic solution. For example, in 125. Valid Palindrome, don't use a regex pattern match on a string when a two-pointer solution that traverses the string as an array is expected.
- Never rush or try to go fast. Find the flow. You'll be at your maximum speed, and the problem will solve itself.
2026-04-20
- Take advantage of the constraints. Most of the time, constraints affect the program at the edges: empty list, starting with at least one node in a tree, ruling out negative values, ... But sometimes, they let you choose a totally different approach or algorithm. See problem 326. Power of Three for instance, where testing whether \(n\) is a power of \(3\) becomes testing whether \(n\) divides \(3^{19}\), the largest power of \(3\) smaller than \(2^{31} - 1\), the upper bound of the constraint.
2026-04-25
- Recognize the pattern. It's only possible to do this after you've seen a pattern at least once. Practice more, and you'll have more patterns in your toolkit. Simple.
2026-07-02
- Start sentences with precise verbs when describing algorithms.
For instance:
- "Scan left to right and compare each symbol with the next one." from 13. Roman to Integer.
- "Keep the current minimum alongside each pushed value." from 155. Min Stack
- "Write from the end." from 88. Merge Sorted Array
Feedback
You usually reach a correct solution and test it well, but often use more machinery than needed. You should focus now in recognizing patterns before coding.
What are your main strengths?
- You persist until you find a correct solution.
- You test edge cases and revise effectively.
- You write clean code once you recognize the pattern.
What are your weaknesses?
- You simulate problems instead of first searching for a simple invariant.
- You sometimes overlook time, space, overflow, or in-place requirements.
- You add unnecessary state, helpers, and custom traversal logic.
What best thinking process could you adopt to solve these problems faster?
- Before coding, identify the problem family and the strongest constraint.
- State what must remain true throughout the algorithm.
- Keep only the variables needed to preserve that property, then test boundary cases.
Leetcode Google Interview¶
(6 days) 2026-05-25 -> 2026-05-30
Problems [17/17]
——— LeetCode Random Questions ———
- 669. Trim a Binary Search Tree
- 445. Add Two Numbers II
- 1079. Letter Tile Possibilities
- 1042. Flower Planting With No Adjacent
- 1002. Find Common Characters
- 1221. Split a String in Balanced Strings
- 290. Word Pattern
- 542. 01 Matrix
- 35. Search Insert Position
- 547. Number of Provinces
- 796. Rotate String
- 229. Majority Element II
- 404. Sum of Left Leaves
- 746. Min Cost Climbing Stairs
- 292. Nim Game
- 929. Unique Email Addresses
- 904. Fruit Into Baskets
Lessons
2026-05-26
- Use a stack. If you need to process in reverse order of consumption, use a stack. See 445. Add Two Numbers II.
- Use a queue. If you need to process in same order of consumption, use a queue.
2026-05-27
- Think fast. Fail fast. And solve the problem.
- Don't fall into the trap. Sometimes problems are not what they seem to be. For instance, 290. Word Pattern looks like a simple string parsing, but is in fact a small hash map problem. Likewise, 542. 01 Matrix looks like DP, but the clean solution is really a graph shortest path from many sources at once.
- Reverse the search. For instance, in 542. 01 Matrix, the problem is framed like this "return the distance of the nearest 0 for each cell". But the right way to look at it is to reverse the search and start from 0 nodes and expand one layer at a time until reaching 1s of non processed nodes yet, which gives the shortest distances.
2026-05-28
- Don't confuse linear time with one pass. 2 passes is still linear time: \(O(2n) = O(n)\). See 229. Majority Element II.
2026-06-01
- Write simple and correct code fast. Sometimes this means using built-ins like in 929. Unique Email Adresses where using
splitandreplacestring methods makes the code easy to follow. Remember that in interviews, "better" usually means:- correct
- easy to explain
- easy to verify
- hard to break
- written quickly
2026-06-02
- Don't forget to advance while loops. For instance:
while i < n: ...expectsi += 1inwhileblock.while left < right: ...expectsleft += 1orright -= 1or both in thewhileblock.while stack: ...expectsstack.pop()in thewhileblock.while queue: ...expectsqueue.popleft()in thewhileblock.while tail: ...expectstail = tail.nextin thewhileblock, assumingtailhas the propertynextto advance the list.
Feedback
You recognize more problem families and adopt standard solutions faster than in LeetCode Top Easy. However, you still start coding before making the invariant and boundaries precise.
What are your main strengths?
- You identify the correct algorithm family more often.
- You use Python data structures comfortably.
- You learn from feedback and rewrite solutions quickly.
What are your weaknesses?
- You still simulate a process when a simpler summary would work.
- You sometimes miss standard templates such as sliding window or multi-source BFS.
- You make boundary and update errors when variable meanings are unclear.
What best thinking process could you adopt to solve these problems faster?
- Describe the task as a familiar operation, such as finding a boundary or maintaining a valid window.
- Define what every variable and data structure represents before updating it.
- Use a standard template and test the beginning, end, smallest input, and repeated values.
LeetCode Top Medium¶
(58 days) 2026-06-05 -> 2026-08-01
Problems [45/45]
——— Array and Strings ———
- 15. 3Sum
- 73. Set Matrix Zeroes
- 49. Group Anagrams
- 3. Longest Substring Without Repeating Characters
- 5. Longest Palindromic Substring
- 334. Increasing Triplet Subsequence
- 38. Count and Say
——— Linked List ———
——— Trees and Graphs ———
- 94. Binary Tree Inorder Traversal
- 103. Binary Tree Zigzag Level Order Traversal
- 105. Construct Binary Tree from Preorder and Inorder Traversal
- 116. Populating Next Right Pointers in Each Node
- 230. Kth Smallest Element in a BST
- 200. Number of Islands
——— Backtracking ———
- 17. Letter Combinations of a Phone Number
- 22. Generate Parentheses
- 46. Permutations
- 78. Subsets
- 79. Word Search
——— Sorting and Searching ———
- 75. Sort Colors
- 347. Top K Frequent Elements
- 215. Kth Largest Element in an Array
- 162. Find Peak Element
- 56. Merge Intervals
- 33. Search in Rotated Sorted Array
- 240. Search a 2D Matrix II
——— Dynamic Programming ———
——— Design ———
——— Math ———
- 202. Happy Number
- 172. Factorial Trailing Zeroes
- 171. Excel Sheet Column Number
- 50. Pow(x, n)
- 69. Sqrt(x)
- 29. Divide Two Integers
- 166. Fraction to Recurring Decimal
——— Others ———
Lessons
2026-06-07
- Find a canonical representation. When you're dealing with a class of objects defined by some constraints, look for a canonical representation of that class, preferably one that's hashable.
- For instance, all anagrams have the same sorted-letter representation, and so we can use it as a key to group strings by anagrams. See 49. Group Anagrams.
- Another example: in 36. Valid Sudoku we pick
(r // 3) * 3 + (c // 3)as the box id, a canonical way to represent belonging to one of the 3x3 boxes in a Sudoku grid.
2026-06-08
-
Store the index, not only the value. When you find an element in a Python list (array), you have its index, its positions. So you can move a pointer to this position in \(O(1)\) later without rescanning the array. You must take advantage of this property of Python list. For instance, in 3. Longest Substring Without Repeating Characters, storing the indices along the characters of the characters you scan in the list lets you move the left pointer of the sliding window in \(O(1)\).
-
Build a list of parts and join them to make a string. When iteratively building a string, prefer to build a list of the parts and join them after the loop is finished. It's more efficient than concatenating strings while iterating. See 38. Count and Say for instance.
2026-06-11
- Find the minimal state your program needs to take its next action at any time.
2026-06-12
- Mark visited nodes within the input data. This is \(O(1)\) space contrary to \(O(n)\) if using a different global set, dictionary, matrix, etc.
- For instance, in 200. Number of Islands, we can mark visited cell by sinking land into water like this
grid[r][c] = "0", so that we don't count the same island twice. - For instance, in 79. Word Search, we can mark the cell
board[r][c] = "#"(and storing its value inchvariable) so that we don't consider that cell again for the path we're building. And when we backtrack to build another path, we restore its valueboard[r][c] = chto make it available for the new path.
- For instance, in 200. Number of Islands, we can mark visited cell by sinking land into water like this
2026-06-23
- Don't enumerate. In LeetCode problems, only in rare cases you'll be asked to enumerate explicitly. But if you think about path enumaration, tuple enumaration, etc. to solve the problem, you're almost always going in the wrong direction. There's is an invariant about the problem, an approach you haven't seen yet. Find it. Enumeration has really bad time complexity. For instance in 55. Jump Game, exploring every possible paths to find one that reaches the end of the array is useless and time expensive. Keeping the maximum reachable index at each step while scanning the array is enough.
2026-06-25
- Don't be lazy. When you have an idea for solving part of the problem: 1) validate it or 2) discard it. Never leave it unclassified just because you're too lazy to give it a shot. For instance, while trying to solve 380. Insert Delete GetRandom O(1):
- I had the idea that I would need a list of the values, and a map from value to index, for the
GetRandomoperation. But I didn't really try to see how it could be implemented. - While implementing a solution after reading AI comments, I saw that I had to remove values from the list in \(O(1)\). But I didn't think enough to have a chance to find the simple solution: swap with the last value in the list, then pop the list.
- I had the idea that I would need a list of the values, and a map from value to index, for the
2026-07-17
- Generate permutations in-place. When dealing with permutations, for each index, swap it with any element in the rest of the list (including at itself). See 384. Shuffle an Array (random permutations) and 46. Permutations. Remember that the permutation group is generated by all transpositions, that is, swaps between pairs.
Feedback
Your mathematical modeling and edge-case analysis improved from LeetCode Google Interview. Your main remaining issue is reducing a valid idea to the smallest sufficient state before implementation.
What are your main strengths?
- You often find useful equations, recurrences, keys, or pointer relationships.
- You use edge cases and counterexamples effectively.
- You explain your reasoning clearly and revise incorrect assumptions.
What are your weaknesses?
- You track many possibilities when one summary value would suffice.
- You detect hidden complexity and mutation risks too late.
- You sometimes solve the basic task but miss its required complexity or mutation rules.
What best thinking process could you adopt to solve these problems faster?
- Extract the exact output, mutation, time, and space requirements before choosing an algorithm.
- Identify repeated work and replace it with a boundary, count, lookup, or best-so-far value.
- State the invariant, use its standard template, and test cases designed to break it.
LeetCode Top Hard¶
(24 days) 2026-08-02 -> 2026-08-25
Problems [46/46]
——— Array and Strings ———
- 238. Product of Array Except Self
- 54. Spiral Matrix
- 454. 4Sum II
- 11. Container With Most Water
- 289. Game of Life
- 41. First Missing Positive
- 128. Longest Consecutive Sequence
- 287. Find the Duplicate Number
- 227. Basic Calculator II
- 239. Sliding Window Maximum
- 76. Minimum Window Substring
——— Linked List ———
——— Trees and Graphs ———
- 127. Word Ladder
- 130. Surrounded Regions
- 236. Lowest Common Ancestor of a Binary Tree
- 124. Binary Tree Maximum Path Sum
- 207. Course Schedule
- 210. Course Schedule II
- 329. Longest Increasing Path in a Matrix
- 315. Count of Smaller Numbers After Self
——— Backtracking ———
- 131. Palindrome Partitioning
- 212. Word Search II
- 301. Remove Invalid Parentheses
- 44. Wildcard Matching
- 10. Regular Expression Matching
——— Sorting and Searching ———
——— Dynamic Programming ———
- 152. Maximum Product Subarray
- 91. Decode Ways
- 309. Best Time to Buy and Sell Stock with Cooldown
- 279. Perfect Squares
- 139. Word Break
- 140. Word Break II
- 312. Burst Balloons
——— Design ———
——— Math ———
——— Others ———
Lessons
2026-08-02
- Think heap when you need the k min or k max of some series. See 215. Kth Largest Element in an Array and 23. Merge k Sorted Lists.
2026-08-23
- Find the invariants. Find where the answer live, in which space. For instance in 41. First Missing Positive noticing that the answer must be in \([1, n + 1]\) opens a new way to look at the problem, which leads to the algo proposed. I didn't notice this.
Feedback
You identify the right algorithm family more consistently than in LeetCode Top Medium and build stronger initial models. Your remaining gap is selecting and proving the exact invariant instead of forcing a familiar technique.
What are your main strengths?
- You recognize BFS, DP, greedy, heaps, and two-pointer problems quickly.
- You use counterexamples to expose flawed assumptions.
- You build reasonable baseline solutions and optimize them effectively.
What are your weaknesses?
- You sometimes choose the right algorithm family but the wrong state or invariant.
- You preserve too much state and repeat avoidable work.
- You sometimes discard candidates, mutate state, or ignore duplicates without proving it is safe.
What best thinking process could you adopt to solve these problems faster?
- Write the brute-force complexity and identify the exact work that must be eliminated.
- Define the smallest state that still preserves every detail needed for correctness.
- Before each pointer move, discard, or mutation, explain why no valid answer can be lost.
LeetCode Graph Theory¶
(11 days) 2026-09-06 -> 2026-09-16
Problems [28/28]
Problems already solved in another collections have been removed.
——— Standard Traversal ———
- 802. Find Eventual Safe States
- 841. Keys and Rooms
- 1129. Shortest Path with Alternating Colors
- 1376. Time Needed to Inform All Employees
- 1466. Reorder Routes to Make All Paths Lead to the City Zero
- 797. All Paths From Source to Target
- 1192. Critical Connections in a Network
——— BFS ———
- 1926. Nearest Exit from Entrance in Maze
- 934. Shortest Bridge
- 433. Minimum Genetic Mutation
- 1306. Jump Game III
- 1091. Shortest Path in Binary Matrix
- 863. All Nodes Distance K in Binary Tree
- 864. Shortest Path to Get All Keys
——— Matrix Graphs ———
- 1020. Number of Enclaves
- 1254. Number of Closed Islands
- 695. Max Area of Island
- 417. Pacific Atlantic Water Flow
——— Graph Theory ———
- 997. Find the Town Judge
- 1557. Minimum Number of Vertices to Reach All Nodes
- 1615. Maximal Network Rank
- 785. Is Graph Bipartite?
——— Union Find / DSU ———
- 721. Accounts Merge
- 990. Satisfiability of Equality Equations
- 1061. Lexicographically Smallest Equivalent String
- 839. Similar String Groups
——— Topological Sort ———
——— Dijkstra's (subscribers) ———
——— Minimum Spanning Tree (subscribers) ———
Lessons
2026-09-10
- Check your code for silly mistakes before submitting it.
2026-09-12
- Be confident in your solution. When a problem seems trivial, maybe it is for you now. You practice consistently, so it's normal that what was hard one day becomes easy another day. It can feel surprising at first, but you should notice that you've improved, then just crush the problem and move on. For instance, I found the correct solution, with proof and implementation, almost instantly for 1557. Minimum Number of Vertices to Reach All Nodesproblem, which is said to be of medium difficulty. It was so easy and so quick that I thought there had to be a trap I missed.
Feedback
Your graph modeling and standard traversals are stronger than in the previous batch . Your main risk now is defining too little search state or losing track of what each update means.
What are your main strengths?
- You recognize reachability, shortest paths, components, and dependencies.
- You find useful reductions, such as reverse searches and boundary flood fills.
- You use BFS and DFS reliably on straightforward problems.
What are your weaknesses?
- You sometimes mark a node as visited when its color, keys, or DFS status also matter.
- You lose the invariant in small updates, such as changing the wrong node or counting an edge twice.
- You repeat path searches when one reverse traversal or topological pass could combine the work.
What best thinking process could you adopt to solve these problems faster?
- Name the graph task, then define exactly what a queue entry and a visited state represent.
- Before searching from many starting points, check whether you can reverse the search or combine sources.
- Trace one transition: what you read, update, and enqueue. Then test a cycle and a converging path.
LeetCode Dynamic Programming¶
(9 days) 2026-09-17 -> 2026-09-25
Problems [34/34]
LeetCode Dynamic Programming ->
Problems already solved in another collections have been removed.
——— Fibonacci style ———
——— Matrix ———
- 64. Minimum Path Sum
- 63. Unique Paths II
- 120. Triangle
- 931. Minimum Falling Path Sum
- 221. Maximal Square
——— On Strings ———
- 516. Longest Palindromic Subsequence
- 72. Edit Distance
- 712. Minimum ASCII Delete Sum for Two Strings
- 115. Distinct Subsequences
——— Longest Increasing Subsequence ———
- 673. Number of Longest Increasing Subsequence
- 646. Maximum Length of Pair Chain
- 1218. Longest Arithmetic Subsequence of Given Difference
- 1027. Longest Arithmetic Subsequence
- 354. Russian Doll Envelopes
- 1964. Find the Longest Valid Obstacle Course at Each Position
——— Longest Common Subsequence ———
- 1143. Longest Common Subsequence
- 1035. Uncrossed Lines
- 1312. Minimum Insertion Steps to Make a String Palindrome
——— Best Time to Buy & Sell Stock / State Machine ———
- 714. Best Time to Buy and Sell Stock with Transaction Fee
- 123. Best Time to Buy and Sell Stock III
- 188. Best Time to Buy and Sell Stock IV
——— On Trees ———
——— Knapsack ———
——— General 1D ———
Lessons
No Lessons.
Feedback
Compared with the previous batch, you show stronger instincts for reusable states and reducing memory in DP. You recognize the right problem shape, but sometimes compress the state before proving that it preserves every possible winning path.
What are your main strengths?
- You recognize grid, subsequence, knapsack, and stock DP patterns.
- You look for reusable states and ways to reduce memory.
- You notice when sorting or greedy choices would destroy important order.
What are your weaknesses?
- You sometimes keep only one history when another could lead to a better answer later.
- You compress DP too early, causing update-order and boundary errors.
- You sometimes leave counting rules and complexity checks until after choosing the loops.
What best thinking process could you adopt to solve these problems faster?
- Define exactly what each state represents, then ask whether two histories with that state can have different futures.
- Write every legal transition and derive the base cases before filling the table.
- Check the full DP's complexity first; compress it only after you can explain what each value means before and after an update.
LeetCode Design¶
(?? days) 2026-09-27 -> ??
Design [52/126]
Problems already solved in another collections have been removed.
——— Simple state and simulation ———
- 1603. Design Parking System
- 1357. Apply Discount Every n Orders
- 2043. Simple Bank System
- 348. Design Tic-Tac-Toe
- 3242. Design Neighbor Sum Service
- 2069. Walking Robot Simulation II
- 1472. Design Browser History
- 2241. Design an ATM Machine
- 2408. Design SQL
- 2254. Design Video Sharing Platform
- 2590. Design a Todo List
- 2502. Design Memory Allocator
- 353. Design Snake Game
- 3391. Design a 3D Binary Matrix with Efficient Layer Tracking
——— Hash maps and indexed state ———
- 705. Design HashSet
- 170. Two Sum III - Data structure design
- 288. Unique Word Abbreviation
- 379. Design Phone Directory
- 2671. Frequency Tracker
- 1570. Dot Product of Two Sparse Vectors
- 1865. Finding Pairs With a Certain Sum
- 2013. Detect Squares
- 2166. Design Bitset
- 2227. Encrypt and Decrypt Strings
——— Randomized arrays ———
——— Stacks, queues, and linked structures ———
- 707. Design Linked List
- 225. Implement Stack using Queues
- 232. Implement Queue using Stacks
- 622. Design Circular Queue
- 641. Design Circular Deque
- 1381. Design a Stack With Increment Operation
- 901. Online Stock Span
- 716. Max Stack
- 895. Maximum Frequency Stack
- 1670. Design Front Middle Back Queue
- 1172. Dinner Plate Stacks
- 1756. Design Most Recently Used Queue
- 2296. Design a Text Editor
——— Iterators and lazy traversal ———
- 251. Flatten 2D Vector
- 281. Zigzag Iterator
- 284. Peeking Iterator
- 604. Design Compressed String Iterator
- 900. RLE Iterator
- 1286. Iterator for Combination
- 1656. Design an Ordered Stream
——— Streaming counters and sliding windows ———
- 346. Moving Average from Data Stream
- 933. Number of Recent Calls
- 2526. Find Consecutive Integers from a Data Stream
- 2424. Longest Uploaded Prefix
- 359. Logger Rate Limiter
- 362. Design Hit Counter
- 1352. Product of the Last K Numbers
- 1396. Design Underground System
- 1348. Tweet Counts Per Frequency
- 1797. Design Authentication Manager
- 3508. Implement Router
——— Range queries and updates ———
- 303. Range Sum Query - Immutable
- 304. Range Sum Query 2D - Immutable
- 2080. Range Frequency Queries
- 1476. Subrectangle Queries
- 307. Range Sum Query - Mutable
- 308. Range Sum Query 2D - Mutable
- 1157. Online Majority Element In Subarray
- 1622. Fancy Sequence
- 3484. Design Spreadsheet
- 631. Design Excel Sum Formula
- 3709. Design Exam Scores Tracker
——— Time-indexed and versioned state ———
- 244. Shortest Word Distance II
- 911. Online Election
- 635. Design Log Storage System
- 981. Time Based Key-Value Store
- 1146. Snapshot Array
——— Heaps, rankings, and order statistics ———
- 703. Kth Largest Element in a Stream
- 2336. Smallest Number in Infinite Set
- 1845. Seat Reservation Manager
- 1244. Design A Leaderboard
- 2349. Design a Number Container System
- 2034. Stock Price Fluctuation
- 2353. Design a Food Rating System
- 3408. Design Task Manager
- 3815. Design Auction System
- 2102. Sequentially Ordinal Rank Tracker
- 1825. Finding MK Average
- 3369. Design an Array Statistics Tracker
- 1206. Design Skiplist
——— Tries and prefix search ———
- 208. Implement Trie (Prefix Tree)
- 211. Design Add and Search Words Data Structure
- 676. Implement Magic Dictionary
- 1804. Implement Trie II (Prefix Tree)
- 677. Map Sum Pairs
- 745. Prefix and Suffix Search
- 642. Design Search Autocomplete System
- 1032. Stream of Characters
——— Encoding and serialization ———
- 271. Encode and Decode Strings
- 535. Encode and Decode TinyURL
- 449. Serialize and Deserialize BST
- 431. Encode N-ary Tree to Binary Tree
——— Trees and hierarchical structures ———
- 173. Binary Search Tree Iterator
- 1586. Binary Search Tree Iterator II
- 919. Complete Binary Tree Inserter
- 1261. Find Elements in a Contaminated Binary Tree
- 1600. Throne Inheritance
- 1993. Operations on Tree
- 1483. Kth Ancestor of a Tree Node
- 1628. Design an Expression Tree With Evaluate Function
- 1166. Design File System
- 588. Design In-Memory File System
——— Intervals and reservations ———
- 729. My Calendar I
- 731. My Calendar II
- 732. My Calendar III
- 352. Data Stream as Disjoint Intervals
- 715. Range Module
- 2276. Count Integers in Intervals
- 855. Exam Room
- 2286. Booking Concert Tickets in Groups
——— Ordered buckets and eviction caches ———
——— Graph-backed services ———
- 1500. Design a File Sharing System
- 2642. Design Graph With Shortest Path Calculator
- 1724. Checking Existence of Edge Length Limited Paths II
- 355. Design Twitter
——— Composite event and marketplace systems ———
Lessons
2026-09-27
- Don't forget
selfwhen designing classes.- Use
self.my_func(...)andself.my_attrwhen calling methods or referring to attributes. - Use
selfas the first argument when defining methods:def my_func(self, ...).
- Use
2026-09-29
- Ask the interviewer for clarification. LeetCode design problem descriptions are vague.
- Constraints may not be fully specified and may only become clear from the examples: For instance in 2408. Design SQL, column IDs are 1-based, but you can only deduced that constraint by reading precisely the first example.
- Constraints may be understood in more than one way: In 2590. Design a Todo List, I didn't understand that the task IDs must be incremented globally across users, not per user "This ID starts at
1and is sequentially increasing.". The example didn't help with this as it only add task to one user.
Feedback
TODO
LeetCode SQL 50¶
(?? days) 2026-07-07 -> 2026-...
Problems [35/50]
——— Select ———
- 1757. Recyclable and Low Fat Products
- 584. Find Customer Referee
- 595. Big Countries
- 1148. Article Views I
- 1683. Invalid Tweets
——— Basic Joins ———
- 1378. Replace Employee ID With The Unique Identifier
- 1068. Product Sales Analysis I
- 1581. Customer Who Visited but Did Not Make Any Transactions
- 197. Rising Temperature
- 1661. Average Time of Process per Machine
- 577. Employee Bonus
- 1280. Students and Examinations
- 570. Managers with at Least 5 Direct Reports
- 1934. Confirmation Rate
——— Basic Aggregate Functions ———
- 620. Not Boring Movies
- 1251. Average Selling Price
- 1075. Project Employees I
- 1633. Percentage of Users Attended a Contest
- 1211. Queries Quality and Percentage
- 1193. Monthly Transactions I
- 1174. Immediate Food Delivery II
- 550. Game Play Analysis IV
——— Sorting and Grouping ———
- 2356. Number of Unique Subjects Taught by Each Teacher
- 1141. User Activity for the Past 30 Days I
- 1070. Product Sales Analysis III
- 596. Classes With at Least 5 Students
- 1729. Find Followers Count
- 619. Biggest Single Number
- 1045. Customers Who Bought All Products
——— Advanced Select and Joins ———
- 1731. The Number of Employees Which Report to Each Employee
- 1789. Primary Department for Each Employee
- 610. Triangle Judgement
- 180. Consecutive Numbers
- 1164. Product Price at a Given Date
- 1204. Last Person to Fit in the Bus
- 1907. Count Salary Categories
——— Subqueries ———
- 1978. Employees Whose Manager Left the Company
- 626. Exchange Seats
- 1341. Movie Rating
- 1321. Restaurant Growth
- 602. Friend Requests II: Who Has the Most Friends
- 585. Investments in 2016
- 185. Department Top Three Salaries
——— Advanced String Functions / Regex / Clause ———
Lessons
2026-07-13
- Manage your energy. If you're tired after solving a problem in SQL, take a break and come back fresh to solve it in Pandas. Don't look up the answer before really trying to solve it yourself. You never learn anything that way.
2026-07-14
- Don't use reserved keywords in SQL queries. For instance, in 1661. Average Time of Process per Machine, I tried to use
Endas a CTE table name, and it errored. When I changed it toEndActivity, it worked fine. This was likely because of the SQL syntaxCASE ... END.