File tree
476 files changed
+880
-809
lines changed- lcci
- 01.02.Check Permutation
- 01.04.Palindrome Permutation
- 01.08.Zero Matrix
- 03.02.Min Stack
- 03.03.Stack of Plates
- 08.10.Color Fill
- 16.02.Words Frequency
- 16.14.Best Line
- 17.09.Get Kth Magic Number
- 17.19.Missing Two
- 17.20.Continuous Median
- lcof
- 面试题03. 数组中重复的数字
- 面试题09. 用两个栈实现队列
- 面试题19. 正则表达式匹配
- 面试题20. 表示数值的字符串
- 面试题30. 包含min函数的栈
- 面试题32 - I. 从上到下打印二叉树
- 面试题32 - II. 从上到下打印二叉树 II
- 面试题34. 二叉树中和为某一值的路径
- 面试题35. 复杂链表的复制
- 面试题37. 序列化二叉树
- 面试题41. 数据流中的中位数
- 面试题45. 把数组排成最小的数
- 面试题50. 第一个只出现一次的字符
- 面试题52. 两个链表的第一个公共节点
- 面试题56 - I. 数组中数字出现的次数
- 面试题59 - II. 队列的最大值
- lcof2/剑指 Offer II 052. 展平二叉搜索树
- solution
- 0000-0099
- 0010.Regular Expression Matching
- 0016.3Sum Closest
- 0031.Next Permutation
- 0043.Multiply Strings
- 0060.Permutation Sequence
- 0065.Valid Number
- 0099.Recover Binary Search Tree
- 0100-0199
- 0104.Maximum Depth of Binary Tree
- 0109.Convert Sorted List to Binary Search Tree
- 0111.Minimum Depth of Binary Tree
- 0117.Populating Next Right Pointers in Each Node II
- 0129.Sum Root to Leaf Numbers
- 0138.Copy List with Random Pointer
- 0155.Min Stack
- 0157.Read N Characters Given Read4
- 0158.Read N Characters Given read4 II - Call Multiple Times
- 0170.Two Sum III - Data structure design
- 0200-0299
- 0217.Contains Duplicate
- 0227.Basic Calculator II
- 0232.Implement Queue using Stacks
- 0242.Valid Anagram
- 0244.Shortest Word Distance II
- 0283.Move Zeroes
- 0295.Find Median from Data Stream
- 0300-0399
- 0301.Remove Invalid Parentheses
- 0303.Range Sum Query - Immutable
- 0341.Flatten Nested List Iterator
- 0389.Find the Difference
- 0392.Is Subsequence
- 0400-0499/0404.Sum of Left Leaves
- 0500-0599
- 0546.Remove Boxes
- 0566.Reshape the Matrix
- 0589.N-ary Tree Preorder Traversal
- 0600-0699
- 0604.Design Compressed String Iterator
- 0635.Design Log Storage System
- 0653.Two Sum IV - Input is a BST
- 0669.Trim a Binary Search Tree
- 0700-0799
- 0705.Design HashSet
- 0707.Design Linked List
- 0709.To Lower Case
- 0733.Flood Fill
- 0762.Prime Number of Set Bits in Binary Representation
- 0769.Max Chunks To Make Sorted
- 0771.Jewels and Stones
- 0776.Split BST
- 0791.Custom Sort String
- 0792.Number of Matching Subsequences
- 0794.Valid Tic-Tac-Toe State
- 0795.Number of Subarrays with Bounded Maximum
- 0800-0899
- 0805.Split Array With Same Average
- 0808.Soup Servings
- 0809.Expressive Words
- 0827.Making A Large Island
- 0850.Rectangle Area II
- 0854.K-Similar Strings
- 0855.Exam Room
- 0864.Shortest Path to Get All Keys
- 0876.Middle of the Linked List
- 0878.Nth Magical Number
- 0884.Uncommon Words from Two Sentences
- 0890.Find and Replace Pattern
- 0895.Maximum Frequency Stack
- 0900-0999
- 0901.Online Stock Span
- 0913.Cat and Mouse
- 0927.Three Equal Parts
- 0940.Distinct Subsequences II
- 0953.Verifying an Alien Dictionary
- 0976.Largest Perimeter Triangle
- 1000-1099
- 1026.Maximum Difference Between Node and Ancestor
- 1038.Binary Search Tree to Greater Sum Tree
- 1047.Remove All Adjacent Duplicates In String
- 1057.Campus Bikes
- 1058.Minimize Rounding Error to Meet Target
- 1096.Brace Expansion II
- 1100-1199
- 1106.Parsing A Boolean Expression
- 1146.Snapshot Array
- 1152.Analyze User Website Visit Pattern
- 1176.Diet Plan Performance
- 1200-1299
- 1210.Minimum Moves to Reach Target with Rotations
- 1249.Minimum Remove to Make Valid Parentheses
- 1266.Minimum Time Visiting All Points
- 1271.Hexspeak
- 1279.Traffic Light Controlled Intersection
- 1290.Convert Binary Number in a Linked List to Integer
- 1300-1399
- 1309.Decrypt String from Alphabet to Integer Mapping
- 1313.Decompress Run-Length Encoded List
- 1348.Tweet Counts Per Frequency
- 1352.Product of the Last K Numbers
- 1356.Sort Integers by The Number of 1 Bits
- 1357.Apply Discount Every n Orders
- 1400-1499
- 1429.First Unique Number
- 1431.Kids With the Greatest Number of Candies
- 1436.Destination City
- 1441.Build an Array With Stack Operations
- 1469.Find All The Lonely Nodes
- 1491.Average Salary Excluding the Minimum and Maximum Salary
- 1494.Parallel Courses II
- 1500-1599
- 1502.Can Make Arithmetic Progression From Sequence
- 1512.Number of Good Pairs
- 1561.Maximum Number of Coins You Can Get
- 1572.Matrix Diagonal Sum
- 1588.Sum of All Odd Length Subarrays
- 1598.Crawler Log Folder
- 1600-1699
- 1600.Throne Inheritance
- 1603.Design Parking System
- 1604.Alert Using Same Key-Card Three or More Times in a One Hour Period
- 1616.Split Two Strings to Make Palindrome
- 1624.Largest Substring Between Two Equal Characters
- 1632.Rank Transform of a Matrix
- 1634.Add Two Polynomials Represented as Linked Lists
- 1658.Minimum Operations to Reduce X to Zero
- 1662.Check If Two String Arrays are Equivalent
- 1666.Change the Root of a Binary Tree
- 1668.Maximum Repeating Substring
- 1670.Design Front Middle Back Queue
- 1672.Richest Customer Wealth
- 1674.Minimum Moves to Make Array Complementary
- 1678.Goal Parser Interpretation
- 1682.Longest Palindromic Subsequence II
- 1684.Count the Number of Consistent Strings
- 1687.Delivering Boxes from Storage to Ports
- 1689.Partitioning Into Minimum Number Of Deci-Binary Numbers
- 1691.Maximum Height by Stacking Cuboids
- 1700-1799
- 1700.Number of Students Unable to Eat Lunch
- 1704.Determine if String Halves Are Alike
- 1712.Ways to Split Array Into Three Subarrays
- 1730.Shortest Path to Get Food
- 1732.Find the Highest Altitude
- 1750.Minimum Length of String After Deleting Similar Ends
- 1752.Check if Array Is Sorted and Rotated
- 1754.Largest Merge Of Two Strings
- 1758.Minimum Changes To Make Alternating Binary String
- 1759.Count Number of Homogenous Substrings
- 1760.Minimum Limit of Balls in a Bag
- 1763.Longest Nice Substring
- 1765.Map of Highest Peak
- 1768.Merge Strings Alternately
- 1769.Minimum Number of Operations to Move All Balls to Each Box
- 1773.Count Items Matching a Rule
- 1779.Find Nearest Point That Has the Same X or Y Coordinate
- 1785.Minimum Elements to Add to Form a Given Sum
- 1790.Check if One String Swap Can Make Strings Equal
- 1792.Maximum Average Pass Ratio
- 1796.Second Largest Digit in a String
- 1797.Design Authentication Manager
- 1799.Maximize Score After N Operations
- 1800-1899
- 1800.Maximum Ascending Subarray Sum
- 1803.Count Pairs With XOR in a Range
- 1804.Implement Trie II (Prefix Tree)
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
476 files changed
+880
-809
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
6 |
| - | |
7 |
| - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
8 | 9 |
| |
9 | 10 |
| |
10 | 11 |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 |
| - | |
| 3 | + | |
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
| 1 | + | |
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
9 |
| - | |
| 9 | + | |
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
14 |
| - | |
| 14 | + | |
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
19 |
| - | |
| 19 | + | |
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
23 |
| - | |
| 23 | + | |
24 | 24 |
| |
25 | 25 |
| |
26 | 26 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5 | 5 |
| |
6 | 6 |
| |
7 | 7 |
| |
8 |
| - | |
| 8 | + | |
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
18 |
| - | |
| 18 | + | |
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
22 |
| - | |
| 22 | + | |
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
16 |
| - | |
| 16 | + | |
| 17 | + | |
17 | 18 |
| |
18 | 19 |
| |
19 | 20 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5 | 5 |
| |
6 | 6 |
| |
7 | 7 |
| |
8 |
| - | |
| 8 | + | |
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
9 |
| - | |
| 9 | + | |
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
138 | 138 |
| |
139 | 139 |
| |
140 | 140 |
| |
141 |
| - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
142 | 146 |
| |
143 | 147 |
| |
144 | 148 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
120 | 120 |
| |
121 | 121 |
| |
122 | 122 |
| |
123 |
| - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
124 | 128 |
| |
125 | 129 |
| |
126 | 130 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
| 1 | + | |
2 | 2 |
| |
3 | 3 |
| |
4 |
| - | |
| 4 | + | |
5 | 5 |
| |
6 | 6 |
| |
7 | 7 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
12 |
| - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
13 | 15 |
| |
14 | 16 |
| |
15 | 17 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
92 | 92 |
| |
93 | 93 |
| |
94 | 94 |
| |
95 |
| - | |
96 | 95 |
| |
97 | 96 |
| |
98 | 97 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
80 | 80 |
| |
81 | 81 |
| |
82 | 82 |
| |
83 |
| - | |
84 | 83 |
| |
85 | 84 |
| |
86 | 85 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
5 |
| - | |
6 | 5 |
| |
7 |
| - | |
| 6 | + | |
8 | 7 |
| |
9 | 8 |
| |
10 | 9 |
| |
| |||
14 | 13 |
| |
15 | 14 |
| |
16 | 15 |
| |
17 |
| - | |
| 16 | + | |
18 | 17 |
| |
19 | 18 |
| |
20 | 19 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
7 |
| - | |
8 | 7 |
| |
9 |
| - | |
| 8 | + | |
10 | 9 |
| |
11 | 10 |
| |
12 | 11 |
| |
13 | 12 |
| |
14 | 13 |
| |
15 | 14 |
| |
16 | 15 |
| |
17 |
| - | |
| 16 | + | |
18 | 17 |
| |
19 | 18 |
| |
20 | 19 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
104 | 104 |
| |
105 | 105 |
| |
106 | 106 |
| |
107 |
| - | |
| 107 | + | |
108 | 108 |
| |
109 | 109 |
| |
110 | 110 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 | 3 |
| |
4 |
| - | |
| 4 | + | |
5 | 5 |
| |
6 | 6 |
| |
7 | 7 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 |
| - | |
| 3 | + | |
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 | 3 |
| |
4 |
| - | |
5 | 4 |
| |
6 |
| - | |
| 5 | + | |
7 | 6 |
| |
8 | 7 |
| |
9 | 8 |
| |
10 |
| - | |
| 9 | + | |
11 | 10 |
| |
12 | 11 |
| |
13 | 12 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
169 | 169 |
| |
170 | 170 |
| |
171 | 171 |
| |
172 |
| - | |
| 172 | + | |
| 173 | + | |
173 | 174 |
| |
174 | 175 |
| |
175 | 176 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
13 |
| - | |
| 13 | + | |
| 14 | + | |
14 | 15 |
| |
15 | 16 |
| |
16 | 17 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
170 | 170 |
| |
171 | 171 |
| |
172 | 172 |
| |
173 |
| - | |
| 173 | + | |
| 174 | + | |
174 | 175 |
| |
175 | 176 |
| |
176 | 177 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
18 |
| - | |
| 18 | + | |
| 19 | + | |
19 | 20 |
| |
20 | 21 |
| |
21 | 22 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
9 |
| - | |
| 9 | + | |
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
14 |
| - | |
| 14 | + | |
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
19 |
| - | |
| 19 | + | |
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
23 |
| - | |
| 23 | + | |
24 | 24 |
| |
25 | 25 |
| |
26 | 26 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
86 | 86 |
| |
87 | 87 |
| |
88 | 88 |
| |
89 |
| - | |
| 89 | + | |
90 | 90 |
| |
91 | 91 |
| |
92 | 92 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
17 |
| - | |
| 17 | + | |
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
15 |
| - | |
| 15 | + | |
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
17 |
| - | |
| 17 | + | |
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
209 | 209 |
| |
210 | 210 |
| |
211 | 211 |
| |
212 |
| - | |
| 212 | + | |
213 | 213 |
| |
214 | 214 |
| |
215 | 215 |
| |
| |||
220 | 220 |
| |
221 | 221 |
| |
222 | 222 |
| |
223 |
| - | |
| 223 | + | |
224 | 224 |
| |
225 | 225 |
| |
226 | 226 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
22 |
| - | |
| 22 | + | |
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
| |||
31 | 31 |
| |
32 | 32 |
| |
33 | 33 |
| |
34 |
| - | |
| 34 | + | |
35 | 35 |
| |
36 | 36 |
| |
37 | 37 |
| |
|
0 commit comments