File tree
1,359 files changed
+4118
-4886
lines changed- basic
- searching/BinarySearch
- sorting
- BubbleSort
- CountingSort
- HeapSort
- InsertionSort
- QuickSort
- SelectionSort
- ShellSort
- lcci
- 01.02.Check Permutation
- 01.04.Palindrome Permutation
- 01.08.Zero Matrix
- 04.01.Route Between Nodes
- 04.06.Successor
- 08.04.Power Set
- 08.10.Color Fill
- 10.10.Rank from Stream
- 16.06.Smallest Difference
- 16.19.Pond Sizes
- 16.25.LRU Cache
- 17.01.Add Without Plus
- 17.06.Number Of 2s In Range
- 17.09.Get Kth Magic Number
- 17.11.Find Closest
- 17.17.Multi Search
- 17.19.Missing Two
- 17.20.Continuous Median
- lcof
- 面试题03. 数组中重复的数字
- 面试题05. 替换空格
- 面试题09. 用两个栈实现队列
- 面试题14- I. 剪绳子
- 面试题19. 正则表达式匹配
- 面试题32 - II. 从上到下打印二叉树 II
- 面试题34. 二叉树中和为某一值的路径
- 面试题35. 复杂链表的复制
- 面试题37. 序列化二叉树
- 面试题41. 数据流中的中位数
- 面试题49. 丑数
- 面试题50. 第一个只出现一次的字符
- 面试题51. 数组中的逆序对
- 面试题52. 两个链表的第一个公共节点
- 面试题55 - II. 平衡二叉树
- 面试题59 - II. 队列的最大值
- 面试题65. 不用加减乘除做加法
- lcof2
- 剑指 Offer II 005. 单词长度的最大乘积
- 剑指 Offer II 007. 数组中和为 0 的三个数
- 剑指 Offer II 029. 排序的循环链表
- 剑指 Offer II 031. 最近最少使用缓存
- 剑指 Offer II 038. 每日温度
- 剑指 Offer II 040. 矩阵中最大的矩形
- 剑指 Offer II 041. 滑动窗口的平均值
- 剑指 Offer II 043. 往完全二叉树添加节点
- 剑指 Offer II 044. 二叉树每层的最大值
- 剑指 Offer II 049. 从根节点到叶节点的路径数字之和
- 剑指 Offer II 052. 展平二叉搜索树
- 剑指 Offer II 057. 值和下标之差都在给定的范围内
- 剑指 Offer II 058. 日程表
- 剑指 Offer II 062. 实现前缀树
- 剑指 Offer II 063. 替换单词
- 剑指 Offer II 065. 最短的单词编码
- 剑指 Offer II 067. 最大的异或
- 剑指 Offer II 072. 求平方根
- 剑指 Offer II 087. 复原 IP
- 剑指 Offer II 103. 最少的硬币数目
- 剑指 Offer II 105. 岛屿的最大面积
- 剑指 Offer II 106. 二分图
- 剑指 Offer II 108. 单词演变
- 剑指 Offer II 109. 开密码锁
- 剑指 Offer II 111. 计算除法
- 剑指 Offer II 112. 最长递增路径
- 剑指 Offer II 116. 朋友圈
- 剑指 Offer II 117. 相似的字符串
- 剑指 Offer II 118. 多余的边
- lcp/LCP 09. 最小跳跃次数
- lcs/LCS 03. 主题空间
- solution
- 0000-0099
- 0001.Two Sum
- 0007.Reverse Integer
- 0010.Regular Expression Matching
- 0012.Integer to Roman
- 0013.Roman to Integer
- 0014.Longest Common Prefix
- 0016.3Sum Closest
- 0024.Swap Nodes in Pairs
- 0026.Remove Duplicates from Sorted Array
- 0027.Remove Element
- 0028.Find the Index of the First Occurrence in a String
- 0030.Substring with Concatenation of All Words
- 0034.Find First and Last Position of Element in Sorted Array
- 0041.First Missing Positive
- 0058.Length of Last Word
- 0060.Permutation Sequence
- 0065.Valid Number
- 0069.Sqrt(x)
- 0070.Climbing Stairs
- 0071.Simplify Path
- 0074.Search a 2D Matrix
- 0076.Minimum Window Substring
- 0088.Merge Sorted Array
- 0091.Decode Ways
- 0092.Reverse Linked List II
- 0093.Restore IP Addresses
- 0097.Interleaving String
- 0099.Recover Binary Search Tree
- 0100-0199
- 0100.Same Tree
- 0102.Binary Tree Level Order Traversal
- 0104.Maximum Depth of Binary Tree
- 0109.Convert Sorted List to Binary Search Tree
- 0111.Minimum Depth of Binary Tree
- 0121.Best Time to Buy and Sell Stock
- 0125.Valid Palindrome
- 0127.Word Ladder
- 0129.Sum Root to Leaf Numbers
- 0130.Surrounded Regions
- 0136.Single Number
- 0137.Single Number II
- 0138.Copy List with Random Pointer
- 0139.Word Break
- 0146.LRU Cache
- 0155.Min Stack
- 0157.Read N Characters Given Read4
- 0158.Read N Characters Given read4 II - Call Multiple Times
- 0169.Majority Element
- 0170.Two Sum III - Data structure design
- 0174.Dungeon Game
- 0188.Best Time to Buy and Sell Stock IV
- 0198.House Robber
- 0200-0299
- 0200.Number of Islands
- 0208.Implement Trie (Prefix Tree)
- 0211.Design Add and Search Words Data Structure
- 0217.Contains Duplicate
- 0218.The Skyline Problem
- 0220.Contains Duplicate III
- 0225.Implement Stack using Queues
- 0227.Basic Calculator II
- 0229.Majority Element II
- 0230.Kth Smallest Element in a BST
- 0239.Sliding Window Maximum
- 0242.Valid Anagram
- 0244.Shortest Word Distance II
- 0254.Factor Combinations
- 0261.Graph Valid Tree
- 0263.Ugly Number
- 0264.Ugly Number II
- 0268.Missing Number
- 0271.Encode and Decode Strings
- 0274.H-Index
- 0277.Find the Celebrity
- 0283.Move Zeroes
- 0294.Flip Game II
- 0295.Find Median from Data Stream
- 0299.Bulls and Cows
- 0300-0399
- 0300.Longest Increasing Subsequence
- 0301.Remove Invalid Parentheses
- 0303.Range Sum Query - Immutable
- 0305.Number of Islands II
- 0306.Additive Number
- 0307.Range Sum Query - Mutable
- 0308.Range Sum Query 2D - Mutable
- 0315.Count of Smaller Numbers After Self
- 0318.Maximum Product of Word Lengths
- 0322.Coin Change
- 0323.Number of Connected Components in an Undirected Graph
- 0324.Wiggle Sort II
- 0327.Count of Range Sum
- 0328.Odd Even Linked List
- 0341.Flatten Nested List Iterator
- 0346.Moving Average from Data Stream
- 0349.Intersection of Two Arrays
- 0350.Intersection of Two Arrays II
- 0354.Russian Doll Envelopes
- 0365.Water and Jug Problem
- 0370.Range Addition
- 0371.Sum of Two Integers
- 0372.Super Pow
- 0373.Find K Pairs with Smallest Sums
- 0380.Insert Delete GetRandom O(1)
- 0383.Ransom Note
- 0385.Mini Parser
- 0387.First Unique Character in a String
- 0389.Find the Difference
- 0391.Perfect Rectangle
- 0392.Is Subsequence
- 0395.Longest Substring with At Least K Repeating Characters
- 0399.Evaluate Division
- 0400-0499
- 0402.Remove K Digits
- 0404.Sum of Left Leaves
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
1,359 files changed
+4118
-4886
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
| 11 | + | |
11 | 12 |
| |
12 | 13 |
| |
13 | 14 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5 | 5 |
| |
6 | 6 |
| |
7 | 7 |
| |
8 |
| - | |
| 8 | + | |
| 9 | + | |
9 | 10 |
| |
10 | 11 |
| |
11 | 12 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
22 |
| - | |
| 22 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
| 1 | + | |
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
| |||
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
26 |
| - | |
| 26 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
2 |
| - | |
3 |
| - | |
4 |
| - | |
5 |
| - | |
6 |
| - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
7 | 20 |
| |
8 |
| - | |
9 |
| - | |
10 |
| - | |
11 |
| - | |
12 |
| - | |
13 |
| - | |
14 |
| - | |
15 |
| - | |
16 |
| - | |
17 |
| - | |
18 |
| - | |
19 | 21 |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
20 |
| - | |
21 |
| - | |
22 |
| - | |
23 |
| - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
24 | 39 |
| |
25 |
| - | |
26 |
| - | |
27 |
| - | |
28 |
| - | |
29 |
| - | |
30 |
| - | |
31 |
| - | |
32 |
| - | |
33 |
| - | |
34 |
| - | |
35 |
| - | |
36 | 40 |
| |
37 | 41 |
| |
38 | 42 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
48 | 48 |
| |
49 | 49 |
| |
50 | 50 |
| |
51 |
| - | |
| 51 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
19 |
| - | |
| 19 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
42 | 42 |
| |
43 | 43 |
| |
44 | 44 |
| |
45 |
| - | |
| 45 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
15 |
| - | |
16 |
| - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
17 | 19 |
| |
18 | 20 |
| |
19 | 21 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
21 |
| - | |
| 21 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
22 |
| - | |
| 22 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
112 | 112 |
| |
113 | 113 |
| |
114 | 114 |
| |
115 |
| - | |
116 |
| - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
117 | 118 |
| |
118 | 119 |
| |
119 | 120 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
92 | 92 |
| |
93 | 93 |
| |
94 | 94 |
| |
95 |
| - | |
96 |
| - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
97 | 98 |
| |
98 | 99 |
| |
99 | 100 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
63 | 63 |
| |
64 | 64 |
| |
65 | 65 |
| |
66 |
| - | |
| 66 | + | |
67 | 67 |
| |
68 | 68 |
| |
69 | 69 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
48 | 48 |
| |
49 | 49 |
| |
50 | 50 |
| |
51 |
| - | |
| 51 | + | |
52 | 52 |
| |
53 | 53 |
| |
54 | 54 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
400 | 400 |
| |
401 | 401 |
| |
402 | 402 |
| |
403 |
| - | |
| 403 | + | |
404 | 404 |
| |
405 | 405 |
| |
406 |
| - | |
407 |
| - | |
| 406 | + | |
| 407 | + | |
408 | 408 |
| |
409 | 409 |
| |
410 | 410 |
| |
| |||
428 | 428 |
| |
429 | 429 |
| |
430 | 430 |
| |
431 |
| - | |
| 431 | + | |
432 | 432 |
| |
433 | 433 |
| |
434 | 434 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
405 | 405 |
| |
406 | 406 |
| |
407 | 407 |
| |
408 |
| - | |
| 408 | + | |
409 | 409 |
| |
410 | 410 |
| |
411 |
| - | |
412 |
| - | |
| 411 | + | |
| 412 | + | |
413 | 413 |
| |
414 | 414 |
| |
415 | 415 |
| |
| |||
433 | 433 |
| |
434 | 434 |
| |
435 | 435 |
| |
436 |
| - | |
| 436 | + | |
437 | 437 |
| |
438 | 438 |
| |
439 | 439 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
153 | 153 |
| |
154 | 154 |
| |
155 | 155 |
| |
156 |
| - | |
| 156 | + | |
157 | 157 |
| |
158 | 158 |
| |
159 | 159 |
| |
| |||
176 | 176 |
| |
177 | 177 |
| |
178 | 178 |
| |
179 |
| - | |
180 |
| - | |
| 179 | + | |
| 180 | + | |
181 | 181 |
| |
182 | 182 |
| |
183 | 183 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
152 | 152 |
| |
153 | 153 |
| |
154 | 154 |
| |
155 |
| - | |
| 155 | + | |
156 | 156 |
| |
157 | 157 |
| |
158 | 158 |
| |
| |||
175 | 175 |
| |
176 | 176 |
| |
177 | 177 |
| |
178 |
| - | |
179 |
| - | |
| 178 | + | |
| 179 | + | |
180 | 180 |
| |
181 | 181 |
| |
182 | 182 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
156 | 156 |
| |
157 | 157 |
| |
158 | 158 |
| |
159 |
| - | |
160 |
| - | |
161 |
| - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
162 | 162 |
| |
163 | 163 |
| |
164 | 164 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
169 | 169 |
| |
170 | 170 |
| |
171 | 171 |
| |
172 |
| - | |
173 |
| - | |
174 |
| - | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
175 | 175 |
| |
176 | 176 |
| |
177 | 177 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
160 | 160 |
| |
161 | 161 |
| |
162 | 162 |
| |
163 |
| - | |
164 |
| - | |
| 163 | + | |
165 | 164 |
| |
166 |
| - | |
167 |
| - | |
168 |
| - | |
169 |
| - | |
| 165 | + | |
| 166 | + | |
170 | 167 |
| |
171 | 168 |
| |
172 | 169 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
153 | 153 |
| |
154 | 154 |
| |
155 | 155 |
| |
156 |
| - | |
157 |
| - | |
| 156 | + | |
158 | 157 |
| |
159 |
| - | |
160 |
| - | |
161 |
| - | |
162 |
| - | |
| 158 | + | |
| 159 | + | |
163 | 160 |
| |
164 | 161 |
| |
165 | 162 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
112 | 112 |
| |
113 | 113 |
| |
114 | 114 |
| |
115 |
| - | |
| 115 | + | |
| 116 | + | |
116 | 117 |
| |
117 | 118 |
| |
118 | 119 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
109 | 109 |
| |
110 | 110 |
| |
111 | 111 |
| |
112 |
| - | |
| 112 | + | |
| 113 | + | |
113 | 114 |
| |
114 | 115 |
| |
115 | 116 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
163 | 163 |
| |
164 | 164 |
| |
165 | 165 |
| |
166 |
| - | |
| 166 | + | |
167 | 167 |
| |
168 | 168 |
| |
169 | 169 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
146 | 146 |
| |
147 | 147 |
| |
148 | 148 |
| |
149 |
| - | |
| 149 | + | |
150 | 150 |
| |
151 | 151 |
| |
152 | 152 |
| |
|
0 commit comments