Leetcode 解题笔记

Leetcode 题库链接

  断断续续刷 Leetcode 题挺久了,做后面题时前面很多题都忘的差不多了,在此弄个已经完成题目汇总贴,并附上每道题目的解题连接,以便日后查阅巩固学习。做题过程借鉴了很多大佬的绝妙想法,非常感谢,在此不一一列出。

Leetcode 题号 题目 通过率 难易程度
1 Two Sum 44.3% Easy
2 Add Two Numbers 31.4% Medium
3 Longest Substring Without Repeating Characters 28.6% Medium
4 Median of Two Sorted Arrays 26.8 Hard
5 Longest Palindromic Substring 27.6% Medium
6 ZigZag Conversion 32.5% Medium
7 Reverse Integer 25.4% Easy
8 String to Integer (atoi) 14.7% Medium
9 Palindrome Number 44.0% Easy
10 Regular Expression Matching 25.5% Hard
11 Container With Most Water 45.5% Medium
12 Integer to Roman 51.5% Medium
13 Roman to Integer 52.8% Easy
14 Longest Common Prefix 33.8% Easy
15 3Sum 24.3% Medium
17 Letter Combinations of a Phone Number 42.2% Medium
18 4Sum 31.0% Medium
19 Remove Nth Node From End of List 34.4% Medium
20 Valid Parentheses 36.8% Easy
21 Merge Two Sorted Lists 47.9% Easy
22 Generate Parentheses 55.8% Medium
23 Merge k Sorted Lists 35.0% Hard
26 Remove Duplicates from Sorted Array 41.2% Easy
27 Remove Element 45.0% Easy
28 Implement strStr() 32.4% Easy
29 Divide Two Integers 16.2% Medium
31 Next Permutation 30.7% Medium
32 Longest Valid Parentheses 25.8% Hard
33 Search in Rotated Sorted Array 33.0% Medium
34 Find First and Last Position of Element in Sorted Array 33.8% Medium
35 Search Insert Position 41.0% Easy
36 Valid Sudoku 43.8% Medium
37 Sudoku Solver 37.8% Hard
38 Count and Say 41.1% Easy
39 Combination Sum 49.5% Medium
40 Combination Sum II 42.5% Medium
41 First Missing Positive 29.3% Hard
42 Trapping Rain Water 43.7% Hard
43 Multiply Strings 31.0% Medium
44 Wildcard Matching 23.1% Hard
45 Jump Game II 28.4% Hard
46 Permutations 56.2% Medium
47 Permutations II 41.3% Medium
48 Rotate Image 49.5% Medium
49 Group Anagrams 47.9% Medium
50 Pow(x, n) 28.2% Medium
52 N-Queens II 52.7% Hard
53 Maximum Subarray 43.9% Easy
54 Spiral Matrix 30.8% Medium
55 Jump Game 32.2% Medium
56 Merge Intervals 36.0% Medium
57 Insert Interval 31.5% Hard
59 Spiral Matrix II 47.3% Medium
60 Permutation Sequence 33.4% Medium
62 Unique Paths 48.3% Medium
64 Minimum Path Sum 47.7% Medium
66 Plus One 41.5% Easy
67 Add Binary 39.8% Easy
69 Sqrt(x) 31.6% Easy
70 Climbing Stairs 44.6% Easy
71 Simplify Path 29.1% Medium
72 Edit Distance 38.5% Hard
74 Search a 2D Matrix 35.0% Medium
77 Combinations 48.6% Medium
78 Subsets 53.8% Medium
79 Word Search 31.8% Medium
80 Remove Duplicates from Sorted Array II 40.8% Medium
82 Remove Duplicates from Sorted List II 33.5% Medium
83 Remove Duplicates from Sorted List 43.0% Easy
84 Largest Rectangle in Histogram 31.6% Hard
85 Maximal Rectangle 33.9% Hard
88 Merge Sorted Array 36.2% Easy
90 Subsets II 43.0% Medium
91 Decode Ways 22.6% Medium
93 Restore IP Addresses 31.8% Medium
94 Binary Tree Inorder Traversal 57.5% Medium
96 Unique Binary Search Trees 46.9% Medium
98 Validate Binary Search Tree 26.0% Medium
101 Symmetric Tree 43.8% Easy
102 Binary Tree Level Order Traversal 49.2% Medium
103 Binary Tree Zigzag Level Order Traversal 42.3% Medium
104 Maximum Depth of Binary Tree 61.2% Easy
105 Construct Binary Tree from Preorder and Inorder Traversal 60.6% Medium
106 Construct Binary Tree from Inorder and Postorder Traversal 63.4% Medium
108 Convert Sorted Array to Binary Search Tree 51.6% Easy
110 Balanced Binary Tree 41.3% Easy
111 Minimum Depth of Binary Tree 35.6% Easy
112 Path Sum 38.2% Easy
113 Path Sum II 41.3% Medium
115 Distinct Subsequences 35.4% Hard
116 Populating Next Right Pointers in Each Node 38.5% Medium
117 Populating Next Right Pointers in Each Node II 34.9% Medium
120 Triangle 39.8% Medium
121 Best Time to Buy and Sell Stock 47.6% Easy
122 Best Time to Buy and Sell Stock II 52.4% Easy
124 Binary Tree Maximum Path Sum 30.4% Hard
128 Longest Consecutive Sequence 42.1% Hard
130 Surrounded Regions 41.7% Medium
134 Gas Station 34.4% Medium
136 Single Number 60.7% Easy
139 Word Break 35.9% Medium
141 Linked List Cycle 37.5% Easy
142 Linked List Cycle II 32.6% Medium
144 Binary Tree Preorder Traversal 51.9% Medium
145 Binary Tree Postorder Traversal 49.3% Hard
146 LRU Cache 26.1% Medium
148 Sort List 36.0% Medium
150 Evaluate Reverse Polish Notation 32.7% Medium
151 Reverse Words in a String 17.1% Medium
153 Find Minimum in Rotated Sorted Array 43.2% Medium
154 Find Minimum in Rotated Sorted Array II 39.5% Hard
155 Min Stack 37.6% Easy
160 Intersection of Two Linked Lists 34.5% Easy
162 Find Peak Element 41.5% Medium
176 Second Highest Salary 27.6% Easy
191 Number of 1 Bits 43.9% Easy
198 House Robber 41.2% Easy
200 Number of Islands 42.1% Medium
201 Bitwise AND of Numbers Range 36.2% Medium
206 Reverse Linked List 55.5% Easy
209 Minimum Size Subarray Sum 35.2% Medium
213 House Robber II 35.4% Medium
215 Kth Largest Element in an Array 48.5% Medium
216 Combination Sum III 52.1% Medium
217 Contains Duplicate 52.5% Easy
219 Contains Duplicate II 35.6% Easy
220 Contains Duplicate III 19.9% Medium
221 Maximal Square 33.4% Medium
227 Basic Calculator II 33.9% Medium
228 Summary Ranges 36.4% Medium
230 Kth Smallest Element in a BST 52.3% Medium
236 Lowest Common Ancestor of a Binary Tree 38.1% Medium
238 Product of Array Except Self 55.7% Medium
240 Search a 2D Matrix II 41.1% Medium
241 Different Ways to Add Parentheses 50.6% Medium
263 Ugly Number 40.8% Easy
264 Ugly Number II 丑数 36.9% Medium
322 Coin Change 31.1% Medium
337 House Robber III 48.4% Medium
354 Russian Doll Envelopes 34.1% Hard
393 UTF-8 Validation 36.1% Medium
402 Remove K Digits 26.9% Medium
415 Add Strings 44.1% Easy
432 All O`one Data Structure 29.9% Hard
547 Friend Circles 54.1% Medium
567 Permutation in String 38.7% Medium
674 Longest Continuous Increasing Subsequence 44.5% Easy
695 Max Area of Island 57.8% Medium
746 Min Cost Climbing Stairs 47.7% Easy

未完待续......

你可能感兴趣的:(Leetcode 解题笔记)