� Coding Interview Problems List � Array 1. 2. 3. 4. Find the missing number in a given integer array of 1 to 100 [Time O(n)] Find the duplicate number in a given integer array [Space O(n) Time O(n)] Find the largest and smallest number in an unsorted integer array [Time O(n)] Find all pairs of an integer array whose sum is equal to a given number [Space O(n) Time O(n)] 5. Find duplicate numbers in an array containing multiple duplicates [Space O(n) Time O(n)] 6. Remove duplicates from an array in place 7. Reverse an array in place 8. Find the intersection of two arrays 9. Find the maximum product of two integers in an array 10. Find the minimum value in a rotated sorted array 11. Find the maximum sum subarray (Kadane's algorithm) 12. Rotate an array by k positions 13. Find the subarray with the given sum 14. Merge two sorted arrays 15. Move all zeros to the end of an array 16. Find the majority element in an array (Boyer-Moore voting algorithm) 17. Find the equilibrium index of an array 18. Rearrange an array such that even index elements are smaller and odd index elements are greater 19. Find the largest subarray with equal number of 0s and 1s 20. Find the smallest subarray with a sum greater than a given value � Strings 21. Reverse a string in place 22. Check if two strings are anagrams of each other 23. Find all permutations of a string 24. Find the first non-repeating character in a string 25. Count the occurrence of a given character in a string 26. Remove duplicate characters from a string 27. Check if a string is a palindrome 28. Convert a given string into an integer 29. Find the longest substring without repeating characters 30. Find the longest common prefix 31. Convert a given string into its integer equivalent (atoi) 32. Check if a string is a valid shuffle of two distinct strings 33. Implement strstr() to find the first occurrence of a substring 34. Find the longest repeating subsequence in a string 35. Remove all adjacent duplicates in a string 36. Check if one string is a rotation of another 37. Find the smallest window in a string containing all characters of another string 38. Find the longest palindromic substring 39. Convert a string to title case (capitalize first letter of each word) 40. Count and say the sequence for a given number � Linked List 41. Reverse a linked list 42. Detect a cycle in a linked list 43. Find the middle element of a linked list 44. Remove the nth node from the end of a linked list 45. Merge two sorted linked lists 46. Remove duplicates from a linked list 47. Find the intersection point of two linked lists 48. Detect and remove a loop in a linked list 49. Add two numbers represented by linked lists 50. Check if a linked list is a palindrome 51. Implement a singly linked list 52. Implement a doubly linked list 53. Delete a node in a singly linked list given only access to that node 54. Find the intersection point of two linked lists using two pointers 55. Split a linked list into two equal halves 56. Sort a linked list using merge sort 57. Flatten a multilevel linked list 58. Remove nodes that have a greater value on the right 59. Clone a linked list with next and random pointer 60. Implement a skip list � Stack and Queue 61. Implement a stack using an array/linked list 62. Implement a queue using an array/linked list 63. Implement a stack using two queues 64. Implement a queue using two stacks 65. Sort a stack 66. Evaluate a postfix expression using a stack 67. Implement a priority queue 68. Check for balanced parentheses in an expression 69. Find the maximum element in a stack in O(1) time 70. Implement a circular queue 71. Design a stack that supports getMin() in O(1) time 72. Implement efficient k stacks in a single array 73. Implement an LFU cache 74. Generate binary numbers from 1 to n using a queue 75. Reverse the first k elements of a queue 76. Check if all the leaves are at the same level in a binary tree using a queue 77. Implement a monotonic queue 78. Check for redundancy in an arithmetic expression 79. Design a stack that supports push, pop, top, and retrieving the maximum in O(1) 80. Implement a deque using a doubly linked list � Tree 81. Traverse a binary tree (preorder, inorder, postorder) 82. Implement a binary search tree (BST) 83. Find the height of a binary tree 84. Find the lowest common ancestor (LCA) of two nodes 85. Check if a binary tree is balanced 86. Check if two binary trees are identical 87. Find the maximum depth of a binary tree 88. Find the diameter of a binary tree 89. Convert a binary tree to a doubly linked list 90. Print all nodes at distance k from a given node 91. Convert a BST to a balanced BST 92. Print the nodes of a binary tree in vertical order 93. Find the level of a node in a binary tree 94. Connect nodes at the same level 95. Construct a binary tree from preorder and inorder traversal 96. Construct a binary tree from inorder and postorder traversal 97. Serialize and deserialize a binary tree 98. Find the inorder successor in a BST 99. Check if a binary tree is a subtree of another 100. Find the sum of all left leaves in a binary tree � Graph 101. 102. 103. 104. 105. 106. 107. 108. 109. 110. 111. 112. 113. Implement DFS and BFS Find the shortest path in an unweighted graph Detect a cycle in a directed/undirected graph Find strongly connected components Implement Dijkstra's algorithm Implement Prim's algorithm Implement Kruskal's algorithm Find the shortest path in a weighted graph Check if a graph is bipartite Find the number of islands in a 2D matrix Implement Floyd-Warshall algorithm Detect a negative cycle in a graph Find articulation points in a graph 114. Find bridges in a graph � Sorting and Searching 115. 116. 117. 118. 119. 120. 121. 122. 123. 124. 125. 126. 127. 128. 129. 130. 131. 132. 133. 134. Implement quicksort Implement mergesort Implement heapsort Implement binary search Find the kth largest element in an unsorted array Search for a number in a rotated sorted array Count occurrences of a number in a sorted array Search for a range in a sorted array Sort an array with many duplicates Find the median of two sorted arrays Find the kth smallest element in a BST Sort an array using heapsort Sort a nearly sorted (K-sorted) array Find the fixed point in a given array Perform exponential search Implement interpolation search Search in a row-wise and column-wise sorted matrix Count inversions in an array Find the peak element in an array Find the frequency of an element in a sorted array � Dynamic Programming 135. 136. 137. 138. 139. 140. 141. 142. 143. 144. 145. 146. 147. 148. 149. 150. 151. 152. Implement Fibonacci sequence (DP) Solve the Knapsack problem Longest Common Subsequence Longest Increasing Subsequence Edit Distance problem Coin Change problem Maximum Subarray problem Egg Dropping problem 0/1 Knapsack problem Minimum Path Sum problem Rod Cutting problem Longest Bitonic Subsequence Matrix Chain Multiplication Subset Sum problem Count subsets with a given sum Target Sum problem Minimum Insertions to form a Palindrome Maximum Product Subarray 153. 154. Maximum Length of Pair Chain Word Break problem � Hashing 155. 156. 157. 158. 159. 160. 161. 162. 163. 164. Implement a hash table Design a hash map Check if two strings are anagrams using a hash table Find the first non-repeating character using a hash map Find the longest substring with distinct characters using a hash map Count frequency of elements in an array using a hash map Group anagrams using a hash table Check for pair sum in an array using hashing Find the largest subarray with 0 sum Find the longest consecutive subsequence � Advanced Topics 165. 166. 167. 168. 169. 170. 171. 172. 173. 174. Implement a Trie (Prefix Tree) Find the shortest path in a maze Solve the N-Queens problem Implement a Red-Black Tree Implement an AVL Tree Find the maximum flow in a flow network (Ford-Fulkerson) Implement Rabin-Karp algorithm (substring search) Implement KMP algorithm (pattern matching) Solve the Traveling Salesman Problem (DP) Solve the Graph Coloring problem � System Design 175. 176. 177. 178. 179. 180. 181. 182. 183. 184. Design a URL shortening service Design a cache system Design a messaging queue Design a file storage system (Dropbox/Google Drive) Design a search autocomplete system Design a rate limiter Design a parking lot system Design a ride-sharing service (Uber/Lyft) Design a social media feed system Design a hotel reservation system � Algorithm Analysis & Complexity 185. 186. 187. 188. 189. 190. 191. 192. 193. 194. Analyze time and space complexity of an algorithm Determine Big-O notation Compare time complexity of algorithms Optimize an algorithm for better performance Identify bottlenecks in an algorithm Prove correctness of an algorithm Find amortized time complexity of a data structure operation Analyze performance of recursive algorithms Use DP to optimize a recursive solution Solve problems using divide and conquer � Miscellaneous 195. 196. 197. 198. 199. 200. 201. 202. 203. 204. 205. 206. 207. 208. 209. 210. 211. 212. 213. 214. Design a vending machine Design an elevator system Design a library management system Design a hospital management system Design a movie ticket booking system Design an online food ordering system Design a document editor (Google Docs) Design a photo-sharing application (Instagram) Design a web crawler Design an email service (Gmail) Implement an LRU cache Implement an MRU cache Implement a random access data structure Design a logging system Implement a thread-safe bounded blocking queue Design a file compression system Design a voting system Design a fraud detection system Design a recommendation system Design a blockchain � Coding Challenges (LeetCode style) 215. 216. 217. 218. Two Sum Add Two Numbers Longest Substring Without Repeating Characters Median of Two Sorted Arrays 219. 220. 221. 222. 223. 224. 225. 226. 227. 228. 229. 230. 231. 232. 233. 234. 235. 236. 237. 238. 239. 240. 241. 242. 243. 244. 245. 246. 247. 248. 249. 250. 251. 252. 253. 254. 255. 256. 257. 258. 259. 260. 261. 262. 263. 264. 265. 266. 267. 268. Longest Palindromic Substring Container With Most Water Trapping Rain Water Multiply Strings Permutations Rotate Image Group Anagrams Maximum Subarray Spiral Matrix Jump Game Merge Intervals Insert Interval Subsets Word Search Binary Tree Inorder Traversal Validate Binary Search Tree Symmetric Tree Binary Tree Level Order Traversal Convert Sorted Array to BST Minimum Depth of Binary Tree Path Sum Construct Binary Tree from Preorder & Inorder Traversal Binary Tree Maximum Path Sum Longest Consecutive Sequence Single Number Linked List Cycle Reorder List Maximum Product Subarray Find Minimum in Rotated Sorted Array Search in Rotated Sorted Array Find Peak Element Word Ladder Clone Graph Course Schedule Implement Trie (Prefix Tree) Word Search II Maximal Rectangle Palindrome Partitioning Surrounded Regions Number of Islands Best Time to Buy and Sell Stock Best Time to Buy and Sell Stock II Best Time to Buy and Sell Stock III Single Number II Maximum Gap Factorial Trailing Zeroes Majority Element Excel Sheet Column Number Rotate Array Binary Tree Right Side View 269. 270. 271. 272. 273. 274. 275. 276. 277. 278. 279. 280. 281. 282. 283. 284. 285. 286. 287. 288. 289. 290. Largest Number Basic Calculator Range Sum Query - Immutable Contains Duplicate Summary Ranges House Robber Implement Stack using Queues Implement Queue using Stacks Number of Digit One Count Primes Find the Duplicate Number Ugly Number Missing Number Product of Array Except Self Sliding Window Maximum Kth Largest Element in an Array Coin Change Combination Sum Permutation Sequence Remove Nth Node From End of List Longest Increasing Subsequence Reconstruct Itinerary
0
You can add this document to your study collection(s)
Sign in Available only to authorized usersYou can add this document to your saved list
Sign in Available only to authorized users(For complaints, use another form )