LeetCode Top Interview Questions Questions | LeetCode 精选 TOP 面试题

By Long Luo

The Solutions of LeetCode Top Interview Questions | 精选 TOP 面试题

No. Problems Difficulty Source Code Solution
001 Two Sum Easy Java
002 Add Two Numbers Medium Java
003 Longest Substring Without Repeating Characters Medium Java
004 Median of Two Sorted Arrays Hard Java
005 Longest Palindromic Substring Medium Java
007 Reverse Integer Easy Java
008 String to Integer (atoi) Medium Java
010 Regular Expression Matching Hard Java
011 Container With Most Water Medium Java
013 Roman to Integer Easy Java
014 Longest Common Prefix Easy Java
015 3Sum Medium Java
017 Letter Combinations of a Phone Number Medium Java
019 Remove Nth Node From End of List Easy Java
020 Valid Parentheses Easy Java
021 Merge Two Sorted Lists Easy Java
022 Generate Parentheses Medium Java
023 Merge k Sorted Lists Hard Java
026 Remove Duplicates from Sorted Array Easy Java
028 Implement strStr() Easy Java
029 Divide Two Integers Medium Java
033 Search in Rotated Sorted Array Medium Java
034 Search for a Range Medium Java
035 Search Insert Position Medium Java
036 Valid Sudoku Medium Java
038 Count and Say Easy Java
041 First Missing Positive Hard Java
042 Trapping Rain Water Hard Java
044 Wildcard Matching Hard Java
046 Permutations Medium Java
048 Rotate Image Medium Java
049 Group Anagrams Medium Java
050 Pow(x, n) Medium Java
053 Maximum Subarray Medium Java
054 Spiral Matrix Medium Java
055 Jump Game Medium Java
056 Merge Intervals Medium Java
062 Unique Paths Medium Java
066 Plus One Easy Java
069 Sqrt(x) Easy Java
070 Climbing Stairs Easy Java
073 Set Matrix Zeroes Medium Java
075 Sort Colors Medium Java
076 Minimum Window Substring Hard Java
078 Subsets Medium Java
079 Word Search Medium Java
084 Largest Rectangle in Histogram Hard Java
088 Merge Sorted Array Easy Java
091 Decode Ways Medium Java
094 Binary Tree Inorder Traversal Medium Java
098 Validate Binary Search Tree Medium Java
101 Symmetric Tree Easy Java
102 Binary Tree Level Order Traversal Easy Java
103 Binary Tree Zigzag Level Order Traversal Medium Java
104 Maximum Depth of Binary Tree Easy Java
105 Construct Binary Tree from Preorder and Inorder Traversal Medium Java
108 Convert Sorted Array to Binary Search Tree Easy Java
116 Populating Next Right Pointers in Each Node Medium Java
118 Pascal’s Triangle Easy Java
121 Best Time to Buy and Sell Stock Easy Java
122 Best Time to Buy and Sell Stock II Easy Java
124 Binary Tree Maximum Path Sum Hard Java
125 Valid Palindrome Easy Java
127 Word Ladder Medium Java
128 Longest Consecutive Sequence Hard Java
130 Surrounded Regions Medium Java
131 Palindrome Partitioning Medium Java
134 Gas Station Medium Java
136 Single Number Easy Java
138 Copy List with Random Pointer Medium Java
139 Word Break Medium Java
140 Word Break II Hard Java
141 Linked List Cycle Easy Java
146 LRU Cache Hard Java
148 Sort List Medium Java
149 Max Points on a Line Hard Java
150 Evaluate Reverse Polish Notation Medium Java
152 Maximum Product Subarray Medium Java
155 Min Stack Easy Java
160 Intersection of Two Linked Lists Easy Java
162 Find Peak Element Medium Java
163 Missing Ranges Medium [没权限]
166 Fraction to Recurring Decimal Medium Java
169 Majority Element Easy Java
171 Excel Sheet Column Number Easy Java
172 Factorial Trailing Zeroes Easy Java
179 Largest Number Medium Java
189 Rotate Array Easy Java
190 Reverse Bits Easy Java
191 Number of 1 Bits Easy Java
198 House Robber Easy Java
200 Number of Islands Medium Java
202 Happy Number Easy Java
204 Count Primes Easy Java
206 Reverse Linked List Easy Java
207 Course Schedule Medium Java
208 Implement Trie (Prefix Tree) Medium Java
210 Course Schedule II Medium Java
212 Word Search II Hard Java
215 Kth Largest Element in an Array Medium Java
217 Contains Duplicate Easy Java
218 The Skyline Problem Hard Java
227 Basic Calculator II Medium Java
230 Kth Smallest Element in a BST Medium Java
234 Palindrome Linked List Easy Java
236 Lowest Common Ancestor of a Binary Tree Medium Java
237 Delete Node in a Linked List Easy Java
238 Product of Array Except Self Medium Java
239 Sliding Window Maximum Hard Java
240 Search a 2D Matrix II Medium Java
242 Valid Anagram Easy Java
251 Flatten 2D Vector Medium [没权限]
253 Meeting Rooms II Medium [没权限]
268 Missing Number Easy Java
269 Alien Dictionary Hard [没权限]
277 Find the Celebrity Medium [没权限]
279 Perfect Squares Medium Java
283 Move Zeroes Easy Java
285 Inorder Successor in BST Medium [没权限]
287 Find the Duplicate Number Hard Java
295 Find Median from Data Stream Hard Java
297 Serialize and Deserialize Binary Tree Hard Java
300 Longest Increasing Subsequence Medium Java
308 Range Sum Query 2D - Mutable Medium [没权限]
315 Count of Smaller Numbers After Self Hard Java
322 Coin Change Medium Java
324 Wiggle Sort II Medium Java
326 Power of Three Easy Java
328 Odd Even Linked List Medium Java
329 Longest Increasing Path in a Matrix Hard Java
334 Increasing Triplet Subsequence Medium Java
340 Longest Substring with At Most K Distinct Characters Hard [Plus]
341 Flatten Nested List Iterator Medium Java
344 Reverse String Easy Java
347 Top K Frequent Elements Medium Java
348 Design Tic-Tac-Toe Medium [没权限]
350 Intersection of Two Arrays II Easy Java
371 Sum of Two Integers Medium Java
378 Kth Smallest Element in a Sorted Matrix Medium Java
380 Insert Delete GetRandom O(1) Medium Java
384 Shuffle an Array Medium Java
387 First Unique Character in a String Easy Java
395 Longest Substring with At Least K Repeating Characters Medium Java
412 Fizz Buzz Easy Java
454 4Sum II Medium Java