Blog | About | Resume | Github |

I did the Leetcode grind, and got offers from Uber, Facebook, LinkedIn, Nextdoor and WalmartLabs. Here are the problems that I think are crucial to developing a strong understanding of interview question patterns.

Also must see: Arden Dertat’s list.

Problems are grouped according to the concepts required to solve them.

17. Letter Combinations of a Phone Number

247. Strobogrammatic Number II

267. Palindrome Permutation II

347. Top K Frequent Elements (Multiple ways to do it, but bucket sort is important.)

215. Kth Largest Element in an Array

138. Copy List with Random Pointer

173. Binary Search Tree Iterator (Important is achieving the average run-time).

341. Flatten Nested List Iterator

535. Encode and Decode TinyURL

158. Read N Characters Given Read4 II - Call multiple times (also checkout the predecessor to this problem)

211. Add and Search Word - Data structure design

208. Implement Trie (Prefix Tree)

Tip: Try coming up with the recursive logic first. Converting that to DP is the easy part.

10. Regular Expression Matching

300. Longest Increasing Subsequence

304. Range Sum Query 2D - Immutable

416. Partition Equal Subset Sum

516. Longest Palindromic Subsequence

583. Delete Operation for Two Strings

Graph related problems are frequently asked, and there are more quality problems out there that you should explore.

215. Kth Largest Element in an Array

Another important category, try to do more problems here.

Quality reading material on this category: Chapter 6 in Competitive Programmer’s Handbook

3. Longest Substring Without Repeating Characters

438. Find All Anagrams in a String

340. Longest Substring with At Most K Distinct Characters

Good reading on this topic: Sourab Reddy’s Medium post

It is a good idea to practice doing preorder, inorder and postorder traversals both iteratively and recrusively. Helps a great deal with approaching tree problems.

Most tree problems are simple tweaks on a type of traversal, or simple DFS/BFS.

98. Validate Binary Search Tree

236. Lowest Common Ancestor of a Binary Tree

103. Binary Tree Zigzag Level Order Traversal

102. Binary Tree Level Order Traversal

199. Binary Tree Right Side View

94. Binary Tree Inorder Traversal

230. Kth Smallest Element in a BST

144. Binary Tree Preorder Traversal

515. Find Largest Value in Each Tree Row

141. Linked List Cycle The O(N) with constant space trick is intresting and has applications in many Linked List problems.

121. Best Time to Buy and Sell Stock

238. Product of Array Except Self

33. Search in Rotated Sorted Array

19. Remove Nth Node From End of List

636. Exclusive Time of Functions

150. Evaluate Reverse Polish Notation

29. Divide Two Integers Careful about overflows!

426. Convert Binary Search Tree to Sorted Doubly Linked List

166. Fraction to Recurring Decimal

34. Find First and Last Position of Element in Sorted Array

209. Minimum Size Subarray Sum

852. Peak Index in a Mountain Array

325. Maximum Size Subarray Sum Equals k