Skip to content

Commit ecefd75

Browse files
committed
feat: 刷 leetcode
1 parent 115e3bb commit ecefd75

File tree

43 files changed

+1176
-574
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1176
-574
lines changed

README.md

Lines changed: 55 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -208,39 +208,68 @@
208208

209209
### 二叉树
210210

211-
#### 二叉树系列算法核心纲领
212-
213-
| 题目 | 掌握度 |
214-
| ------------------------------------------------------------ | ------ |
215-
| [104. 二叉树的最大深度](https://leetcode.cn/problems/maximum-depth-of-binary-tree/) | 已掌握 |
216-
| [144. 二叉树的前序遍历](https://leetcode.cn/problems/binary-tree-preorder-traversal/) | 已掌握 |
217-
| [543. 二叉树的直径](https://leetcode.cn/problems/diameter-of-binary-tree/) | |
218-
| [114. 二叉树展开为链表](https://leetcode.cn/problems/flatten-binary-tree-to-linked-list/) | |
219-
| [116. 填充每个节点的下一个右侧节点指针](https://leetcode.cn/problems/populating-next-right-pointers-in-each-node/) | 未掌握 |
220-
| [226. 翻转二叉树](https://leetcode.cn/problems/invert-binary-tree/) | 已掌握 |
221-
| [105. 从前序与中序遍历序列构造二叉树](https://leetcode.cn/problems/construct-binary-tree-from-preorder-and-inorder-traversal/) | 不熟练 |
222-
| [106. 从中序与后序遍历序列构造二叉树](https://leetcode.cn/problems/construct-binary-tree-from-inorder-and-postorder-traversal/) | 不熟练 |
223-
| [654. 最大二叉树](https://leetcode.cn/problems/maximum-binary-tree/) | 已掌握 |
224-
| [889. 根据前序和后序遍历构造二叉树](https://leetcode.cn/problems/construct-binary-tree-from-preorder-and-postorder-traversal/) | |
225-
| [297. 二叉树的序列化与反序列化](https://leetcode.cn/problems/serialize-and-deserialize-binary-tree/) | 未掌握 |
211+
#### 基础
212+
213+
| 题目 | 掌握度 |
214+
| ------------------------------------------------------------------------------------------------------------------------ | ------ |
215+
| [104. 二叉树的最大深度](https://leetcode.cn/problems/maximum-depth-of-binary-tree/) | 已掌握 |
216+
| [111. 二叉树的最小深度](https://leetcode.cn/problems/minimum-depth-of-binary-tree/) | 已掌握 |
217+
| [144. 二叉树的前序遍历](https://leetcode.cn/problems/binary-tree-preorder-traversal/) | 已掌握 |
218+
| [94. 二叉树的中序遍历](https://leetcode.cn/problems/binary-tree-inorder-traversal/) | 已掌握 |
219+
| [145. 二叉树的后序遍历](https://leetcode.cn/problems/binary-tree-postorder-traversal/) | 已掌握 |
220+
| [102. 二叉树的层序遍历](https://leetcode.cn/problems/binary-tree-level-order-traversal/) | 不熟练 |
221+
| [107. 二叉树的层序遍历 II](https://leetcode.cn/problems/binary-tree-level-order-traversal-ii/) | 已掌握 |
222+
| [543. 二叉树的直径](https://leetcode.cn/problems/diameter-of-binary-tree/) | 未掌握 |
223+
| [114. 二叉树展开为链表](https://leetcode.cn/problems/flatten-binary-tree-to-linked-list/) | 已掌握 |
224+
| [116. 填充每个节点的下一个右侧节点指针](https://leetcode.cn/problems/populating-next-right-pointers-in-each-node/) | 已掌握 |
225+
| [117. 填充每个节点的下一个右侧节点指针 II](https://leetcode.cn/problems/populating-next-right-pointers-in-each-node-ii/) | 已掌握 |
226+
| [226. 翻转二叉树](https://leetcode.cn/problems/invert-binary-tree/) | 已掌握 |
227+
| [654. 最大二叉树](https://leetcode.cn/problems/maximum-binary-tree/) | 已掌握 |
228+
| [297. 二叉树的序列化与反序列化](https://leetcode.cn/problems/serialize-and-deserialize-binary-tree/) | 未掌握 |
229+
| [222. 完全二叉树的节点个数](https://leetcode.cn/problems/count-complete-tree-nodes/) | 已掌握 |
230+
231+
#### 用「遍历」思维解题
232+
233+
| 题目 | 掌握度 |
234+
| ----------------------------------------------------------------------------------------------------------------------------------------------- | ------ |
235+
| [257. 二叉树的所有路径](https://labuladong.online/algo/problem-set/binary-tree-traverse-i/#slug_binary-tree-paths) | 未掌握 |
236+
| [129. 求根节点到叶节点数字之和](https://labuladong.online/algo/problem-set/binary-tree-traverse-i/#slug_sum-root-to-leaf-numbers) | 已掌握 |
237+
| [199. 二叉树的右视图](https://leetcode.cn/problems/binary-tree-right-side-view/) | 已掌握 |
238+
| [988. 从叶结点开始的最小字符串](https://labuladong.online/algo/problem-set/binary-tree-traverse-i/#slug_smallest-string-starting-from-leaf) | 已掌握 |
239+
| [1022. 从根到叶的二进制数之和](https://labuladong.online/algo/problem-set/binary-tree-traverse-i/#slug_sum-of-root-to-leaf-binary-numbers) | 已掌握 |
240+
| [1457. 二叉树中的伪回文路径](https://labuladong.online/algo/problem-set/binary-tree-traverse-i/#slug_pseudo-palindromic-paths-in-a-binary-tree) | 已掌握 |
241+
| [404. 左叶子之和](https://leetcode.cn/problems/sum-of-left-leaves/) | 已掌握 |
242+
| [623. 在二叉树中增加一行](https://leetcode.cn/problems/add-one-row-to-tree/) | 已掌握 |
243+
244+
#### 用「分解」思维解题
245+
246+
| 题目 | 掌握度 |
247+
| ------------------------------------------------------------------------------------------------------------------------------- | ------ |
248+
| [105. 从前序与中序遍历序列构造二叉树](https://leetcode.cn/problems/construct-binary-tree-from-preorder-and-inorder-traversal/) | 已掌握 |
249+
| [106. 从中序与后序遍历序列构造二叉树](https://leetcode.cn/problems/construct-binary-tree-from-inorder-and-postorder-traversal/) | 已掌握 |
250+
| [889. 根据前序和后序遍历构造二叉树](https://leetcode.cn/problems/construct-binary-tree-from-preorder-and-postorder-traversal/) | 已掌握 |
251+
| [331. 验证二叉树的前序序列化](https://leetcode.cn/problems/verify-preorder-serialization-of-a-binary-tree/) | |
252+
| [894. 所有可能的真二叉树](https://leetcode.cn/problems/all-possible-full-binary-trees/) | |
253+
| [998. 最大二叉树 II](https://leetcode.cn/problems/maximum-binary-tree-ii/) | |
254+
| [1110. 删点成林](https://leetcode.cn/problems/delete-nodes-and-return-forest/) | |
226255

227256
### 动态规划
228257

229-
| 题目 | 掌握度 |
230-
| ------------------------------------------------------------ | ------ |
231-
| [322. 零钱兑换](https://leetcode.cn/problems/coin-change/) | |
258+
| 题目 | 掌握度 |
259+
| ----------------------------------------------------------------- | ------ |
260+
| [322. 零钱兑换](https://leetcode.cn/problems/coin-change/) | |
232261
| [509. 斐波那契数](https://leetcode.cn/problems/fibonacci-number/) | |
233-
| | |
234-
| | |
235-
| | |
236-
| | |
237-
| | |
262+
| | |
263+
| | |
264+
| | |
265+
| | |
266+
| | |
238267

239268
### 贪心算法
240269

241-
| 题目 | 掌握度 |
242-
| ------------------------------------------------------------ | ------ |
243-
| [55. 跳跃游戏](https://leetcode.cn/problems/jump-game/) | |
270+
| 题目 | 掌握度 |
271+
| ------------------------------------------------------------- | ------ |
272+
| [55. 跳跃游戏](https://leetcode.cn/problems/jump-game/) | |
244273
| [45. 跳跃游戏 II](https://leetcode.cn/problems/jump-game-ii/) | |
245274

246275
### 分治算法

codes/algorithm/src/main/java/io/github/dunwu/algorithm/array/丑数I.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import java.util.Set;
77

88
/**
9-
* <a href="https://leetcode.cn/problems/ugly-number/description/">263. 丑数</a>
9+
* <a href="https://leetcode.cn/problems/ugly-number/">263. 丑数</a>
1010
*
1111
* @author <a href="mailto:forbreak@163.com">Zhang Peng</a>
1212
* @date 2025-01-24

codes/algorithm/src/main/java/io/github/dunwu/algorithm/array/丑数II.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import org.junit.jupiter.api.Assertions;
44

55
/**
6-
* <a href="https://leetcode.cn/problems/ugly-number-ii/description/">264. 丑数II</a>
6+
* <a href="https://leetcode.cn/problems/ugly-number-ii/">264. 丑数II</a>
77
*
88
* @author <a href="mailto:forbreak@163.com">Zhang Peng</a>
99
* @date 2025-01-24

codes/algorithm/src/main/java/io/github/dunwu/algorithm/array/丑数III.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import org.junit.jupiter.api.Assertions;
44

55
/**
6-
* <a href="https://leetcode.cn/problems/ugly-number-ii/description/">264. 丑数II</a>
6+
* <a href="https://leetcode.cn/problems/ugly-number-ii/">264. 丑数II</a>
77
*
88
* @author <a href="mailto:forbreak@163.com">Zhang Peng</a>
99
* @date 2025-01-24

codes/algorithm/src/main/java/io/github/dunwu/algorithm/array/二进制求和.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import org.junit.jupiter.api.Assertions;
44

55
/**
6-
* <a href="https://leetcode.cn/problems/add-binary/description/">67. 二进制求和</a>
6+
* <a href="https://leetcode.cn/problems/add-binary/">67. 二进制求和</a>
77
*
88
* @author <a href="mailto:forbreak@163.com">Zhang Peng</a>
99
* @date 2025-01-21

codes/algorithm/src/main/java/io/github/dunwu/algorithm/array/最小覆盖子串.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import java.util.HashMap;
77

88
/**
9-
* <a href="https://leetcode.cn/problems/minimum-window-substring/description/">76. 最小覆盖子串</a>
9+
* <a href="https://leetcode.cn/problems/minimum-window-substring/">76. 最小覆盖子串</a>
1010
*
1111
* @author <a href="mailto:forbreak@163.com">Zhang Peng</a>
1212
* @date 2025-01-10

codes/algorithm/src/main/java/io/github/dunwu/algorithm/array/查找和最小的K对数字.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import java.util.TreeMap;
1010

1111
/**
12-
* <a href="https://leetcode.cn/problems/find-k-pairs-with-smallest-sums/description/">373. 查找和最小的 K 对数字</a>
12+
* <a href="https://leetcode.cn/problems/find-k-pairs-with-smallest-sums/">373. 查找和最小的 K 对数字</a>
1313
*
1414
* @author <a href="mailto:forbreak@163.com">Zhang Peng</a>
1515
* @date 2025-01-21

codes/algorithm/src/main/java/io/github/dunwu/algorithm/array/查找总价格为目标值的两个商品.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import java.util.Map;
77

88
/**
9-
* <a href="https://leetcode.cn/problems/he-wei-sde-liang-ge-shu-zi-lcof/description/">LCR 179. 查找总价格为目标值的两个商品</a>
9+
* <a href="https://leetcode.cn/problems/he-wei-sde-liang-ge-shu-zi-lcof/">LCR 179. 查找总价格为目标值的两个商品</a>
1010
*
1111
* @author <a href="mailto:forbreak@163.com">Zhang Peng</a>
1212
* @date 2025-01-13

codes/algorithm/src/main/java/io/github/dunwu/algorithm/array/超级丑数.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import org.junit.jupiter.api.Assertions;
44

55
/**
6-
* <a href="https://leetcode.cn/problems/super-ugly-number/description/">313. 超级丑数</a>
6+
* <a href="https://leetcode.cn/problems/super-ugly-number/">313. 超级丑数</a>
77
*
88
* @author <a href="mailto:forbreak@163.com">Zhang Peng</a>
99
* @date 2025-01-24

codes/algorithm/src/main/java/io/github/dunwu/algorithm/list/两数相加II.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import java.util.List;
77

88
/**
9-
* <a href="https://leetcode.cn/problems/lMSNwu/description/">LCR 025. 两数相加II</a>
9+
* <a href="https://leetcode.cn/problems/lMSNwu/">LCR 025. 两数相加II</a>
1010
*
1111
* @author <a href="mailto:forbreak@163.com">Zhang Peng</a>
1212
* @date 2025-01-21

0 commit comments

Comments
 (0)