Skip to content

Latest commit

 

History

History
338 lines (170 loc) · 4.55 KB

File metadata and controls

338 lines (170 loc) · 4.55 KB

grind 169 problems for basic prep

  1. Two Sum ✔

  2. Add Two Numbers ✔

  3. Longest Substring Without Repeating Characters ✔

  4. Median of Two Sorted Arrays*

  5. Longest Palindromic Substring ✔

  6. Reverse Integer ✔

  7. String to Integer (atoi) ✔

  8. Palindrome Number ✔

  9. Container With Most Water ✔

  10. Roman to Integer ✔

  11. Longest Common Prefix ✔

  12. 3Sum ✔

  13. 3Sum Closest ✔

  14. Letter Combinations of a Phone Number ✔

  15. Remove Nth Node From End of List ✔

  16. Valid Parentheses ✔

  17. Merge Two Sorted Lists ✔

  18. Generate Parentheses ✔

  19. Merge k Sorted Lists ✔

  20. Swap Nodes in Pairs

  21. Reverse Nodes in k-Group

  22. Next Permutation

  23. Longest Valid Parentheses

  24. Search in Rotated Sorted Array

  25. Valid Sudoku

  26. Sudoku Solver

  27. Combination Sum

  28. First Missing Positive

  29. Trapping Rain Water

  30. Permutations

  31. Rotate Image

  32. Group Anagrams

  33. Pow(x, n)

  34. N-Queens

  35. Maximum Subarray

  36. Spiral Matrix

  37. Jump Game

  38. Merge Intervals

  39. Insert Interval

  40. Rotate List

  41. Unique Paths

  42. Add Binary

  43. Climbing Stairs

  44. Set Matrix Zeroes

  45. Search a 2D Matrix

  46. Sort Colors

  47. Minimum Window Substring

  48. Subsets

  49. Word Search

  50. Largest Rectangle in Histogram

  51. Decode Ways

  52. Validate Binary Search Tree

  53. Same Tree

  54. Symmetric Tree

  55. Binary Tree Level Order Traversal

  56. Binary Tree Zigzag Level Order Traversal

  57. Maximum Depth of Binary Tree

  58. Construct Binary Tree from Preorder and Inorder Traversal

  59. Convert Sorted Array to Binary Search Tree

  60. Balanced Binary Tree

  61. Path Sum II

  62. Best Time to Buy and Sell Stock

  63. Binary Tree Maximum Path Sum

  64. Valid Palindrome

  65. Word Ladder

  66. Longest Consecutive Sequence

  67. Clone Graph

  68. Gas Station

  69. Single Number

  70. Word Break

  71. Linked List Cycle

  72. Reorder List

  73. LRU Cache

  74. Sort List

  75. Evaluate Reverse Polish Notation

  76. Maximum Product Subarray

  77. Find Minimum in Rotated Sorted Array

  78. Min Stack

  79. Majority Element

  80. Largest Number

  81. Rotate Array

  82. Reverse Bits

  83. Number of 1 Bits

  84. House Robber

  85. Binary Tree Right Side View

  86. Number of Islands

  87. Reverse Linked List

  88. Course Schedule

  89. Implement Trie (Prefix Tree)

  90. Course Schedule II

  91. Design Add and Search Words Data Structure

  92. Word Search II

  93. Kth Largest Element in an Array

  94. Contains Duplicate

  95. Maximal Square

  96. Basic Calculator

  97. Invert Binary Tree

  98. Basic Calculator II

  99. Kth Smallest Element in a BST

  100. Implement Queue using Stacks

  101. Palindrome Linked List

  102. Lowest Common Ancestor of a Binary Search Tree

  103. Lowest Common Ancestor of a Binary Tree

  104. Product of Array Except Self

  105. Sliding Window Maximum

  106. Valid Anagram

  107. Meeting Rooms

  108. Meeting Rooms II

  109. Graph Valid Tree

  110. Missing Number

  111. Alien Dictionary

  112. Encode and Decode Strings

  113. First Bad Version

  114. Move Zeroes

  115. Inorder Successor in BST

  116. Find the Duplicate Number

  117. Find Median from Data Stream

  118. Serialize and Deserialize Binary Tree

  119. Longest Increasing Subsequence

  120. Minimum Height Trees

  121. Coin Change

  122. Number of Connected Components in an Undirected Graph

  123. Odd Even Linked List

  124. Longest Increasing Path in a Matrix

  125. Palindrome Pairs

  126. Counting Bits

  127. Design Hit Counter

  128. Combination Sum IV

  129. Insert Delete GetRandom O(1)

  130. Ransom Note

  131. Decode String

  132. Longest Palindrome

  133. Partition Equal Subset Sum

  134. Pacific Atlantic Water Flow

  135. Longest Repeating Character Replacement

  136. Non-overlapping Intervals

  137. Path Sum III

  138. Find All Anagrams in a String

  139. Contiguous Array

  140. 01 Matrix

  141. Diameter of Binary Tree

  142. Shortest Path to Get Food

  143. Subarray Sum Equals K

  144. Subtree of Another Tree

  145. Design In-Memory File System

  146. Task Scheduler

  147. Smallest Range Covering Elements from K Lists

  148. Find K Closest Elements

  149. Maximum Width of Binary Tree

  150. Top K Frequent Words

  151. Accounts Merge

  152. Flood Fill

  153. Asteroid Collision

  154. Daily Temperatures

  155. Employee Free Time

  156. Binary Search

  157. Cheapest Flights Within K Stops

  158. Bus Routes

  159. Backspace String Compare

  160. All Nodes Distance K in Binary Tree

  161. Middle of the Linked List

  162. Random Pick with Weight

  163. Maximum Frequency Stack

  164. K Closest Points to Origin

  165. Squares of a Sorted Array

  166. Time Based Key-Value Store

  167. Rotting Oranges

  168. Minimum Knight Moves

  169. Maximum Profit in Job Scheduling