Skip to content

Commit bc8bf57

Browse files
authored
feat: add metadata info (doocs#2815)
1 parent 25603ae commit bc8bf57

File tree

55 files changed

+520
-322
lines changed

Some content is hidden

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

55 files changed

+520
-322
lines changed

lcp/LCP 30. 魔塔游戏/README.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
---
22
comments: true
3+
difficulty: 中等
34
edit_url: https://github.com/doocs/leetcode/edit/main/lcp/LCP%2030.%20%E9%AD%94%E5%A1%94%E6%B8%B8%E6%88%8F/README.md
5+
tags:
6+
- 贪心
7+
- 数组
8+
- 堆(优先队列)
49
---
510

611
# [LCP 30. 魔塔游戏](https://leetcode.cn/problems/p0NxJO)

lcp/LCP 31. 变换的迷宫/README.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
---
22
comments: true
3+
difficulty: 困难
34
edit_url: https://github.com/doocs/leetcode/edit/main/lcp/LCP%2031.%20%E5%8F%98%E6%8D%A2%E7%9A%84%E8%BF%B7%E5%AE%AB/README.md
5+
tags:
6+
- 深度优先搜索
7+
- 广度优先搜索
8+
- 数组
9+
- 动态规划
10+
- 矩阵
411
---
512

613
# [LCP 31. 变换的迷宫](https://leetcode.cn/problems/Db3wC1)
@@ -29,7 +36,7 @@ edit_url: https://github.com/doocs/leetcode/edit/main/lcp/LCP%2031.%20%E5%8F%98%
2936
> 输出:`true`
3037
>
3138
> 解释:
32-
> ![maze.gif](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2031.%20变换的迷宫/images/1615892239-SCIjyf-maze.gif)
39+
> ![maze.gif](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2031.%20%E5%8F%98%E6%8D%A2%E7%9A%84%E8%BF%B7%E5%AE%AB/images/1615892239-SCIjyf-maze.gif)
3340
3441
**示例 2:**
3542

lcp/LCP 32. 批量处理任务/README.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
---
22
comments: true
3+
difficulty: 困难
34
edit_url: https://github.com/doocs/leetcode/edit/main/lcp/LCP%2032.%20%E6%89%B9%E9%87%8F%E5%A4%84%E7%90%86%E4%BB%BB%E5%8A%A1/README.md
5+
tags:
6+
- 贪心
7+
- 数组
8+
- 堆(优先队列)
49
---
510

611
# [LCP 32. 批量处理任务](https://leetcode.cn/problems/t3fKg1)

lcp/LCP 33. 蓄水/README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
---
22
comments: true
3+
difficulty: 简单
34
edit_url: https://github.com/doocs/leetcode/edit/main/lcp/LCP%2033.%20%E8%93%84%E6%B0%B4/README.md
5+
tags:
6+
- 贪心
7+
- 数组
8+
- 堆(优先队列)
49
---
510

611
# [LCP 33. 蓄水](https://leetcode.cn/problems/o8SXZn)
@@ -27,7 +32,7 @@ edit_url: https://github.com/doocs/leetcode/edit/main/lcp/LCP%2033.%20%E8%93%84%
2732
> 解释:
2833
> 第 1 次操作升级 bucket[0]
2934
> 第 2 ~ 4 次操作均选择蓄水,即可完成蓄水要求。
30-
> ![vat1.gif](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2033.%20蓄水/images/1616122992-RkDxoL-vat1.gif)
35+
> ![vat1.gif](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2033.%20%E8%93%84%E6%B0%B4/images/1616122992-RkDxoL-vat1.gif)
3136
3237
**示例 2:**
3338

lcp/LCP 34. 二叉树染色/README.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
---
22
comments: true
3+
difficulty: 中等
34
edit_url: https://github.com/doocs/leetcode/edit/main/lcp/LCP%2034.%20%E4%BA%8C%E5%8F%89%E6%A0%91%E6%9F%93%E8%89%B2/README.md
5+
tags:
6+
-
7+
- 动态规划
8+
- 二叉树
49
---
510

611
# [LCP 34. 二叉树染色](https://leetcode.cn/problems/er-cha-shu-ran-se-UGC)
@@ -17,7 +22,8 @@ edit_url: https://github.com/doocs/leetcode/edit/main/lcp/LCP%2034.%20%E4%BA%8C%
1722
>
1823
> 输出:`12`
1924
>
20-
> 解释:`结点 5、3、4 染成蓝色,获得最大的价值 5+3+4=12` > ![image.png](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2034.%20二叉树染色/images/1616126267-BqaCRj-image.png)
25+
> 解释:`结点 5、3、4 染成蓝色,获得最大的价值 5+3+4=12`
26+
> ![image.png](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2034.%20%E4%BA%8C%E5%8F%89%E6%A0%91%E6%9F%93%E8%89%B2/images/1616126267-BqaCRj-image.png)
2127
2228
**示例 2:**
2329

@@ -26,7 +32,7 @@ edit_url: https://github.com/doocs/leetcode/edit/main/lcp/LCP%2034.%20%E4%BA%8C%
2632
> 输出:`16`
2733
>
2834
> 解释:结点 4、3、9 染成蓝色,获得最大的价值 4+3+9=16
29-
> ![image.png](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2034.%20二叉树染色/images/1616126301-gJbhba-image.png)
35+
> ![image.png](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2034.%20%E4%BA%8C%E5%8F%89%E6%A0%91%E6%9F%93%E8%89%B2/images/1616126301-gJbhba-image.png)
3036
3137
**提示:**
3238

lcp/LCP 35. 电动车游城市/README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
---
22
comments: true
3+
difficulty: 困难
34
edit_url: https://github.com/doocs/leetcode/edit/main/lcp/LCP%2035.%20%E7%94%B5%E5%8A%A8%E8%BD%A6%E6%B8%B8%E5%9F%8E%E5%B8%82/README.md
5+
tags:
6+
-
7+
- 最短路
8+
- 堆(优先队列)
49
---
510

611
# [LCP 35. 电动车游城市](https://leetcode.cn/problems/DFPeFJ)
@@ -21,7 +26,7 @@ edit_url: https://github.com/doocs/leetcode/edit/main/lcp/LCP%2035.%20%E7%94%B5%
2126
> 在城市 1 仅充 3 单位电至城市 3,然后在城市 3 充 5 单位电,行驶至城市 5。
2227
> 充电用时共 3\*10 + 5\*1= 35
2328
> 行驶用时 3 + 5 = 8,此时总用时最短 43。
24-
> ![image.png](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2035.%20电动车游城市/images/1616125304-mzVxIV-image.png)
29+
> ![image.png](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2035.%20%E7%94%B5%E5%8A%A8%E8%BD%A6%E6%B8%B8%E5%9F%8E%E5%B8%82/images/1616125304-mzVxIV-image.png)
2530
2631
**示例 2:**
2732

lcp/LCP 36. 最多牌组数/README.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
---
22
comments: true
3+
difficulty: 困难
34
edit_url: https://github.com/doocs/leetcode/edit/main/lcp/LCP%2036.%20%E6%9C%80%E5%A4%9A%E7%89%8C%E7%BB%84%E6%95%B0/README.md
5+
tags:
6+
- 数组
7+
- 动态规划
8+
- 排序
49
---
510

611
# [LCP 36. 最多牌组数](https://leetcode.cn/problems/Up5XYM)

lcp/LCP 37. 最小矩形面积/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
---
22
comments: true
3+
difficulty: 困难
34
edit_url: https://github.com/doocs/leetcode/edit/main/lcp/LCP%2037.%20%E6%9C%80%E5%B0%8F%E7%9F%A9%E5%BD%A2%E9%9D%A2%E7%A7%AF/README.md
5+
tags:
6+
- 贪心
7+
- 几何
8+
- 数组
9+
- 数学
10+
- 组合数学
11+
- 排序
412
---
513

614
# [LCP 37. 最小矩形面积](https://leetcode.cn/problems/zui-xiao-ju-xing-mian-ji)

lcp/LCP 38. 守卫城堡/README.md

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
---
22
comments: true
3+
difficulty: 困难
34
edit_url: https://github.com/doocs/leetcode/edit/main/lcp/LCP%2038.%20%E5%AE%88%E5%8D%AB%E5%9F%8E%E5%A0%A1/README.md
5+
tags:
6+
- 数组
7+
- 动态规划
8+
- 矩阵
49
---
510

611
# [LCP 38. 守卫城堡](https://leetcode.cn/problems/7rLGCR)
@@ -31,7 +36,7 @@ edit_url: https://github.com/doocs/leetcode/edit/main/lcp/LCP%2038.%20%E5%AE%88%
3136
> 输出:`3`
3237
>
3338
> 解释:至少需要放置三个障碍物
34-
> ![image.png](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2038.%20守卫城堡/images/1614828255-uuNdNJ-image.png)
39+
> ![image.png](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2038.%20%E5%AE%88%E5%8D%AB%E5%9F%8E%E5%A0%A1/images/1614828255-uuNdNJ-image.png)
3540
3641
**示例 2:**
3742

@@ -40,7 +45,7 @@ edit_url: https://github.com/doocs/leetcode/edit/main/lcp/LCP%2038.%20%E5%AE%88%
4045
> 输出:`-1`
4146
>
4247
> 解释:无论怎样修筑障碍物,均无法阻挡最左侧出生的恶魔到达城堡位置
43-
> ![image.png](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2038.%20守卫城堡/images/1614828208-oFlpVs-image.png)
48+
> ![image.png](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2038.%20%E5%AE%88%E5%8D%AB%E5%9F%8E%E5%A0%A1/images/1614828208-oFlpVs-image.png)
4449
4550
**示例 3:**
4651

@@ -49,7 +54,7 @@ edit_url: https://github.com/doocs/leetcode/edit/main/lcp/LCP%2038.%20%E5%AE%88%
4954
> 输出:`0`
5055
>
5156
> 解释:无需放置障碍物即可获得胜利
52-
> ![image.png](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2038.%20守卫城堡/images/1614828242-oveClu-image.png)
57+
> ![image.png](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2038.%20%E5%AE%88%E5%8D%AB%E5%9F%8E%E5%A0%A1/images/1614828242-oveClu-image.png)
5358
5459
**示例 4:**
5560

@@ -58,7 +63,7 @@ edit_url: https://github.com/doocs/leetcode/edit/main/lcp/LCP%2038.%20%E5%AE%88%
5863
> 输出:`4`
5964
>
6065
> 解释:至少需要放置 4 个障碍物,示意图为放置方法之一
61-
> ![image.png](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2038.%20守卫城堡/images/1614828218-sIAYkb-image.png)
66+
> ![image.png](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2038.%20%E5%AE%88%E5%8D%AB%E5%9F%8E%E5%A0%A1/images/1614828218-sIAYkb-image.png)
6267
6368
**提示:**
6469

lcp/LCP 39. 无人机方阵/README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
---
22
comments: true
3+
difficulty: 简单
34
edit_url: https://github.com/doocs/leetcode/edit/main/lcp/LCP%2039.%20%E6%97%A0%E4%BA%BA%E6%9C%BA%E6%96%B9%E9%98%B5/README.md
5+
tags:
6+
- 数组
7+
- 哈希表
8+
- 计数
9+
- 矩阵
410
---
511

612
# [LCP 39. 无人机方阵](https://leetcode.cn/problems/0jQkd0)
@@ -31,7 +37,7 @@ edit_url: https://github.com/doocs/leetcode/edit/main/lcp/LCP%2039.%20%E6%97%A0%
3137
> `[1,0]` 处的无人机移动至 `[1,1]` 处;
3238
> `[1,1]` 处的无人机移动至 `[1,0]` 处,其灯光颜色切换为颜色编号为 `6` 的灯光;
3339
> 因此从`source``target` 所需要的最少灯光切换次数为 1。
34-
> ![8819ccdd664e91c78cde3bba3c701986.gif](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2039.%20无人机方阵/images/1628823765-uCDaux-8819ccdd664e91c78cde3bba3c701986.gif)
40+
> ![8819ccdd664e91c78cde3bba3c701986.gif](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2039.%20%E6%97%A0%E4%BA%BA%E6%9C%BA%E6%96%B9%E9%98%B5/images/1628823765-uCDaux-8819ccdd664e91c78cde3bba3c701986.gif){:height=300px}
3541
3642
**示例 2:**
3743

lcp/LCP 40. 心算挑战/README.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
---
22
comments: true
3+
difficulty: 简单
34
edit_url: https://github.com/doocs/leetcode/edit/main/lcp/LCP%2040.%20%E5%BF%83%E7%AE%97%E6%8C%91%E6%88%98/README.md
5+
tags:
6+
- 贪心
7+
- 数组
8+
- 排序
49
---
510

611
# [LCP 40. 心算挑战](https://leetcode.cn/problems/uOAnQW)

lcp/LCP 41. 黑白翻转棋/README.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
---
22
comments: true
3+
difficulty: 中等
34
edit_url: https://github.com/doocs/leetcode/edit/main/lcp/LCP%2041.%20%E9%BB%91%E7%99%BD%E7%BF%BB%E8%BD%AC%E6%A3%8B/README.md
5+
tags:
6+
- 广度优先搜索
7+
- 数组
8+
- 矩阵
49
---
510

611
# [LCP 41. 黑白翻转棋](https://leetcode.cn/problems/fHi6rV)
@@ -11,7 +16,7 @@ edit_url: https://github.com/doocs/leetcode/edit/main/lcp/LCP%2041.%20%E9%BB%91%
1116

1217
`n*m` 大小的棋盘中,有黑白两种棋子,黑棋记作字母 `"X"`, 白棋记作字母 `"O"`,空余位置记作 `"."`。当落下的棋子与其他相同颜色的棋子在行、列或对角线完全包围(中间不存在空白位置)另一种颜色的棋子,则可以翻转这些棋子的颜色。
1318

14-
![1.gif](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2041.%20黑白翻转棋/images/1630396029-eTgzpN-6da662e67368466a96d203f67bb6e793.gif)![2.gif](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2041.%20黑白翻转棋/images/1630396240-nMvdcc-8e4261afe9f60e05a4f740694b439b6b.gif)![3.gif](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2041.%20黑白翻转棋/images/1630396291-kEtzLL-6fcb682daeecb5c3f56eb88b23c81d33.gif)
19+
![1.gif](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2041.%20%E9%BB%91%E7%99%BD%E7%BF%BB%E8%BD%AC%E6%A3%8B/images/1630396029-eTgzpN-6da662e67368466a96d203f67bb6e793.gif){:height=170px}![2.gif](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2041.%20%E9%BB%91%E7%99%BD%E7%BF%BB%E8%BD%AC%E6%A3%8B/images/1630396240-nMvdcc-8e4261afe9f60e05a4f740694b439b6b.gif){:height=170px}![3.gif](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2041.%20%E9%BB%91%E7%99%BD%E7%BF%BB%E8%BD%AC%E6%A3%8B/images/1630396291-kEtzLL-6fcb682daeecb5c3f56eb88b23c81d33.gif){:height=170px}
1520

1621
「力扣挑战赛」黑白翻转棋项目中,将提供给选手一个未形成可翻转棋子的棋盘残局,其状态记作 `chessboard`。若下一步可放置一枚黑棋,请问选手最多能翻转多少枚白棋。
1722

@@ -37,7 +42,7 @@ edit_url: https://github.com/doocs/leetcode/edit/main/lcp/LCP%2041.%20%E9%BB%91%
3742
>
3843
> 解释:
3944
> 可以选择下在 `[2,2]` 处,能够翻转白方两枚棋子。
40-
> ![2126c1d21b1b9a9924c639d449cc6e65.gif](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2041.%20黑白翻转棋/images/1626683255-OBtBud-2126c1d21b1b9a9924c639d449cc6e65.gif)
45+
> ![2126c1d21b1b9a9924c639d449cc6e65.gif](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2041.%20%E9%BB%91%E7%99%BD%E7%BF%BB%E8%BD%AC%E6%A3%8B/images/1626683255-OBtBud-2126c1d21b1b9a9924c639d449cc6e65.gif)
4146
4247
**示例 3:**
4348

@@ -47,7 +52,7 @@ edit_url: https://github.com/doocs/leetcode/edit/main/lcp/LCP%2041.%20%E9%BB%91%
4752
>
4853
> 解释:
4954
> 可以选择下在 `[6,3]` 处,能够翻转白方四枚棋子。
50-
> ![803f2f04098b6174397d6c696f54d709.gif](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2041.%20黑白翻转棋/images/1630393770-Puyked-803f2f04098b6174397d6c696f54d709.gif)
55+
> ![803f2f04098b6174397d6c696f54d709.gif](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2041.%20%E9%BB%91%E7%99%BD%E7%BF%BB%E8%BD%AC%E6%A3%8B/images/1630393770-Puyked-803f2f04098b6174397d6c696f54d709.gif)
5156
5257
**提示:**
5358

lcp/LCP 42. 玩具套圈/README.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
---
22
comments: true
3+
difficulty: 困难
34
edit_url: https://github.com/doocs/leetcode/edit/main/lcp/LCP%2042.%20%E7%8E%A9%E5%85%B7%E5%A5%97%E5%9C%88/README.md
5+
tags:
6+
- 几何
7+
- 数组
8+
- 哈希表
9+
- 数学
10+
- 二分查找
11+
- 排序
412
---
513

614
# [LCP 42. 玩具套圈](https://leetcode.cn/problems/vFjcfV)
@@ -27,7 +35,7 @@ edit_url: https://github.com/doocs/leetcode/edit/main/lcp/LCP%2042.%20%E7%8E%A9%
2735
> 输出:`1`
2836
>
2937
> 解释: 如图所示,仅套中一个玩具
30-
> ![image.png](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2042.%20玩具套圈/images/1629194140-ydKiGF-image.png)
38+
> ![image.png](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2042.%20%E7%8E%A9%E5%85%B7%E5%A5%97%E5%9C%88/images/1629194140-ydKiGF-image.png)
3139
3240
**示例 2:**
3341

@@ -36,7 +44,7 @@ edit_url: https://github.com/doocs/leetcode/edit/main/lcp/LCP%2042.%20%E7%8E%A9%
3644
> 输出:`2`
3745
>
3846
> 解释: 如图所示,套中两个玩具
39-
> ![image.png](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2042.%20玩具套圈/images/1629194157-RiOAuy-image.png)
47+
> ![image.png](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2042.%20%E7%8E%A9%E5%85%B7%E5%A5%97%E5%9C%88/images/1629194157-RiOAuy-image.png){:width="400px"}
4048
4149
**提示:**
4250

lcp/LCP 43. 十字路口的交通/README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
---
22
comments: true
3+
difficulty: 困难
34
edit_url: https://github.com/doocs/leetcode/edit/main/lcp/LCP%2043.%20%E5%8D%81%E5%AD%97%E8%B7%AF%E5%8F%A3%E7%9A%84%E4%BA%A4%E9%80%9A/README.md
5+
tags:
6+
- 数组
7+
- 字符串
8+
- 动态规划
49
---
510

611
# [LCP 43. 十字路口的交通](https://leetcode.cn/problems/Y1VbOX)
@@ -26,7 +31,7 @@ edit_url: https://github.com/doocs/leetcode/edit/main/lcp/LCP%2043.%20%E5%8D%81%
2631

2732
各个车道驶出的车辆可能的行驶路线如图所示:
2833

29-
![图片.png](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2043.%20十字路口的交通/images/1630393755-gyPeMM-%E5%9B%BE%E7%89%87.png)
34+
![图片.png](https://fastly.jsdelivr.net/gh/doocs/leetcode@main/lcp/LCP%2043.%20%E5%8D%81%E5%AD%97%E8%B7%AF%E5%8F%A3%E7%9A%84%E4%BA%A4%E9%80%9A/images/1630393755-gyPeMM-%E5%9B%BE%E7%89%87.png){:height="350px"}
3035

3136
**注意:**
3237

lcp/LCP 44. 开幕式焰火/README.md

+7-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
---
22
comments: true
3+
difficulty: 简单
34
edit_url: https://github.com/doocs/leetcode/edit/main/lcp/LCP%2044.%20%E5%BC%80%E5%B9%95%E5%BC%8F%E7%84%B0%E7%81%AB/README.md
5+
tags:
6+
-
7+
- 深度优先搜索
8+
- 广度优先搜索
9+
- 哈希表
10+
- 二叉树
411
---
512

613
# [LCP 44. 开幕式焰火](https://leetcode.cn/problems/sZ59z6)
@@ -10,37 +17,27 @@ edit_url: https://github.com/doocs/leetcode/edit/main/lcp/LCP%2044.%20%E5%BC%80%
1017
<!-- 这里写题目描述 -->
1118

1219
「力扣挑战赛」开幕式开始了,空中绽放了一颗二叉树形的巨型焰火。
13-
1420
给定一棵二叉树 `root` 代表焰火,节点值表示巨型焰火这一位置的颜色种类。请帮小扣计算巨型焰火有多少种不同的颜色。
1521

1622
**示例 1:**
1723

1824
> 输入:`root = [1,3,2,1,null,2]`
19-
2025
>
21-
2226
> 输出:`3`
23-
2427
>
25-
2628
> 解释:焰火中有 3 个不同的颜色,值分别为 1、2、3
2729
2830
**示例 2:**
2931

3032
> 输入:`root = [3,3,3]`
31-
3233
>
33-
3434
> 输出:`1`
35-
3635
>
37-
3836
> 解释:焰火中仅出现 1 个颜色,值为 3
3937
4038
**提示:**
4139

4240
- `1 <= 节点个数 <= 1000`
43-
4441
- `1 <= Node.val <= 1000`
4542

4643
## 解法

lcp/LCP 45. 自行车炫技赛场/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
---
22
comments: true
3+
difficulty: 中等
34
edit_url: https://github.com/doocs/leetcode/edit/main/lcp/LCP%2045.%20%E8%87%AA%E8%A1%8C%E8%BD%A6%E7%82%AB%E6%8A%80%E8%B5%9B%E5%9C%BA/README.md
5+
tags:
6+
- 深度优先搜索
7+
- 广度优先搜索
8+
- 记忆化搜索
9+
- 数组
10+
- 动态规划
11+
- 矩阵
412
---
513

614
# [LCP 45. 自行车炫技赛场](https://leetcode.cn/problems/kplEvH)

0 commit comments

Comments
 (0)