Skip to content

professorxin/LeetCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode算法高频题目汇总

序号 题目
1 Two Sum
2 Add Two Numbers
3 Longest Substring Without Repeating Characters
4 Median of Two Sorted Arrays
5 Longest Palindromic Substring
7 Reverse Integer
8 String to Integer (atoi)
9 Palindrome Number
11 Container With Most Water
12 Integer to Roman
13 Roman to Integer
14 Longest Common Prefix
15 3Sum
16 3Sum Closest
17 Letter Combinations of a Phone Number
19 Remove Nth Node From End of List
20 Valid Parentheses
21 Merge Two Sorted Lists
22 Generate Parentheses
23 Merge k Sorted Lists
24 Swap Nodes in Pairs
25 Reverse Nodes in k-Group
26 Remove Duplicates from Sorted Array
27 Remove Element
28 Implement strStr()
31 Next Permutation
32 Longest Valid Parentheses
33 Search in Rotated Sorted Array
34 Find First and Last Position of Element in Sorted Array
35 Search Insert Position
38 Count and Say
39 Combination Sum
40 Combination Sum II
41 First Missing Positive
42 Trapping Rain Water
43 Multiply Strings
45 Jump Game II
46 Permutations
47 Permutations II
48 Rotate Image
49 Group Anagrams
50 Pow(x, n)
53 Maximum Subarray
54 Spiral Matrix
55 Jump Game
56 Merge Intervals
59 Spiral Matrix II
62 Unique Paths
64 Minimum Path Sum
67 Add Binary
69 Sqrt(x)
70 Climbing Stairs
72 Edit Distance
75 Sort Colors
76 Minimum Window Substring
77 Combinations
78 Subsets
79 Word Search
83 Remove Duplicates from Sorted List
84 Largest Rectangle in Histogram
88 Merge Sorted Array
90 Subsets II
91 Decode Ways
93 Restore IP Addresses
94 Binary Tree Inorder Traversal
95 Unique Binary Search Trees II
96 Unique Binary Search Trees
98 Validate Binary Search Tree
101 Symmetric Tree
102 Binary Tree Level Order Traversal
103 Binary Tree Zigzag Level Order Traversal
104 Maximum Depth of Binary Tree
105 Construct Binary Tree from Preorder and Inorder Traversal
108 Convert Sorted Array to Binary Search Tree
109 Convert Sorted List to Binary Search Tree
110 Balanced Binary Tree
111 Minimum Depth of Binary Tree
112 Path Sum
113 Path Sum II
114 Flatten Binary Tree to Linked List
116 Populating Next Right Pointers in Each Node
121 Best Time to Buy and Sell Stock
122 Best Time to Buy and Sell Stock II
123 Best Time to Buy and Sell Stock III
124 Binary Tree Maximum Path Sum
125 Valid Palindrome
127 Word Ladder
128 Longest Consecutive Sequence
130 Surrounded Regions
131 Palindrome Partitioning
134 Gas Station
135 Candy
136 Single Number
138 Copy List with Random Pointer
139 Word Break
140 Word Break II
141 Linked List Cycle
142 Linked List Cycle II
143 Reorder List
144 Binary Tree Preorder Traversal
145 Binary Tree Postorder Traversal
148 Sort List
152 Maximum Product Subarray
153 Find Minimum in Rotated Sorted Array
154 Find Minimum in Rotated Sorted Array II
155 Min Stack
160 Intersection of Two Linked Lists
169 Majority Element
179 Largest Number
190 Reverse Bits
198 House Robber
199 Binary Tree Right Side View
200 Number of Islands
202 Happy Number
205 Isomorphic Strings
206 Reverse Linked List
207 Course Schedule
208 Implement Trie (Prefix Tree)
213 House Robber II
215 Kth Largest Element in an Array
216 Combination Sum III
221 Maximal Square
225 Implement Stack using Queues
226 Invert Binary Tree
230 Kth Smallest Element in a BST
232 Implement Queue using Stacks
234 Palindrome Linked List
235 Lowest Common Ancestor of a Binary Search Tree
236 Lowest Common Ancestor of a Binary Tree
238 Product of Array Except Self
239 Sliding Window Maximum
240 Search a 2D Matrix II
242 Valid Anagram
257 Binary Tree Paths
260 Single Number III
263 Ugly Number
264 Ugly Number II
268 Missing Number
279 Perfect Squares
283 Move Zeroes
287 Find the Duplicate Number
295 Find Median from Data Stream
297 Serialize and Deserialize Binary Tree
300 Longest Increasing Subsequence
303 Range Sum Query - Immutable
309 Best Time to Buy and Sell Stock with Cooldown
322 Coin Change
328 Odd Even Linked List
329 Longest Increasing Path in a Matrix
334 Increasing Triplet Subsequence
337 House Robber III
338 Counting Bits
343 Integer Break
344 Reverse String
347 Top K Frequent Elements
350 Intersection of Two Arrays II
376 Wiggle Subsequence
377 Combination Sum IV
378 Kth Smallest Element in a Sorted Matrix
387 First Unique Character in a String
392 Is Subsequence
394 Decode String
395 Longest Substring with At Least K Repeating Characters
404 Sum of Left Leaves
405 Convert a Number to Hexadecimal
406 Queue Reconstruction by Height
409 Longest Palindrome
413 Arithmetic Slices
416 Partition Equal Subset Sum
435 Non-overlapping Intervals
437 Path Sum III
438 Find All Anagrams in a String
445 Add Two Numbers II
448 Find All Numbers Disappeared in an Array
452 Minimum Number of Arrows to Burst Balloons
455 Assign Cookies
460 LFU Cache
461 Hamming Distance
462 Minimum Moves to Equal Array Elements II
474 Ones and Zeroes
485 Max Consecutive Ones
494 Target Sum
496 Next Greater Element I
501 Find Mode in Binary Search Tree
503 Next Greater Element II
504 Base 7
513 Find Bottom Left Tree Value
518 Coin Change 2
524 Longest Word in Dictionary through Deleting
530 Minimum Absolute Difference in BST
538 Convert BST to Greater Tree
540 Single Element in a Sorted Array
543 Diameter of Binary Tree
547 Friend Circles
557 Reverse Words in a String III
560 Subarray Sum Equals K
565 Array Nesting
566 Reshape the Matrix
572 Subtree of Another Tree
581 Shortest Unsorted Continuous Subarray
583 Delete Operation for Two Strings
605 Can Place Flowers
617 Merge Two Binary Trees
621 Task Scheduler
637 Average of Levels in Binary Tree
645 Set Mismatch
646 Maximum Length of Pair Chain
647 Palindromic Substrings
650 2 Keys Keyboard
653 Two Sum IV - Input is a BST
665 Non-decreasing Array
669 Trim a Binary Search Tree
680 Valid Palindrome II
687 Longest Univalue Path
695 Max Area of Island
697 Degree of an Array
714 Best Time to Buy and Sell Stock with Transaction Fee
725 Split Linked List in Parts
739 Daily Temperatures
746 Min Cost Climbing Stairs
763 Partition Labels
769 Max Chunks To Make Sorted
771 Jewels and Stones
876 Middle of the Linked List
889 Construct Binary Tree from Preorder and Postorder Traversal
946 Validate Stack Sequences

About

LeetCode算法题目解答

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages