Microsoft Coding Interview Questions

Classic DSA with trees, DP, and string processing.

#Title
1Two Sum
2Add Two Numbers
4Median of Two Sorted Arrays
5Longest Palindromic Substring
8String to Integer (atoi)
153 Sum
17Letter Combinations of a Phone Number
19Remove Nth Node From End of List
20Valid Parentheses
21Merge Two Sorted Lists
22Generate Parentheses
23Merge k Sorted Lists
33Search in Rotated Sorted Array
39Combination Sum
40Combination Sum II
46Permutations
48Rotate Image
51N-Queens
53Maximum Subarray
67Add Binary
73Set Matrix Zeroes
74Search a 2D Matrix
75Sort Colors
77Combinations
79Word Search
80Remove Duplicates from Sorted Array II
82Remove Duplicates from Sorted List II
86Partition List
91Decode Ways
92Reverse Linked List II
93Restore IP Addresses
94Binary Tree Inorder Traversal
97Interleaving String
98Validate Binary Search Tree
99Recover Binary Search Tree
101Symmetric Tree
102Binary Tree Level Order Traversal
103Binary Tree Zigzag Level Order Traversal
105Construct Binary Tree from Preorder and Inorder Traversal
106Construct Binary Tree from Inorder and Postorder Traversal
107Binary Tree Level Order Traversal II
108Convert Sorted Array to Binary Search Tree
109Convert Sorted List to Binary Search Tree
111Minimum Depth of Binary Tree
112Path Sum
113Path Sum II
114Flatten Binary Tree to Linked List
116Populating Next Right Pointers in Each Node
117Populating Next Right Pointers in Each Node II
120Triangle
121Best Time to Buy and Sell Stock
123Best Time to Buy and Sell Stock III
124Binary Tree Maximum Path Sum
125Valid Palindrome
129Sum Root to Leaf Numbers
134Gas Station
136Single Number
138Copy List with Random Pointer
141Linked List Cycle
142Linked List Cycle II
144Binary Tree Preorder Traversal
145Binary Tree Postorder Traversal
146LRU Cache
151Reverse Words in a String
153Find Minimum in Rotated Sorted Array
160Intersection of Two Linked Lists
162Find Peak Element
165Compare Version Numbers
168Excel Sheet Column Title
169Majority Element
171Excel Sheet Column Number
173Binary Search Tree Iterator
174Dungeon Game
189Rotate Array
191Number of 1 Bits
199Binary Tree Right Side View
200Number of Islands
203Remove Linked List Elements
204Count Primes
206Reverse Linked List
208Implement Trie (Prefix Tree)
213House Robber II
215Kth Largest Element in an Array
218The Skyline Problem
227Basic Calculator II
230Kth Smallest Element in a BST
232Implement Queue using Stacks
234Palindrome Linked List
235Lowest Common Ancestor of a Binary Search Tree
236Lowest Common Ancestor of a Binary Tree
237Delete Node in a Linked List
238Product of Array Except Self
240Search a 2D Matrix II
258Add Digits
268Missing Number
287Find the Duplicate Number
300Longest Increasing Subsequence
322Coin Change
344Reverse String
373Find K Pairs with Smallest Sums
387First Unique Character in a String
419Battleships in a Board
443String Compression
445Add Two Numbers II
449Serialize and Deserialize BST
452Minimum Number of Arrows to Burst Balloons
6502 Keys Keyboard
6514 Keys Keyboard
672Bulb Switcher II
819Most Common Word
863All Nodes Distance K in Binary Tree