Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 123a0ba

Browse files
author
lucifer
committed
feat: 小岛专题
1 parent 4117a53 commit 123a0ba

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ leetcode 题解,记录自己的 leetcode 解题之路。
267267
- [0295.find-median-from-data-stream](./problems/295.find-median-from-data-stream.md) 🆕
268268
- [0301.remove-invalid-parentheses](./problems/301.remove-invalid-parentheses.md)
269269
- [0335.self-crossPing](./problems/335.self-crossing.md) 🆕
270-
- [0460.lfu-cache](./problems/460.lfu-cache.md)
270+
- [0460.lfu-cache](./problems/460.lfu-cache.md)
271271
- [0472.concatenated-words](./problems/472.concatenated-words.md) 🆕
272272
- [0493.reverse-pairs](./problems/493.reverse-pairs.md) 🆕
273273
- [0895.maximum-frequency-stack](./problems/895.maximum-frequency-stack.md) 🆕
@@ -290,6 +290,7 @@ leetcode 题解,记录自己的 leetcode 解题之路。
290290
- [滑动窗口(思路 + 模板)](./thinkings/slide-window.md) 🆕
291291
- [位运算](./thinkings/bit.md) 🆕
292292
- [设计题](./thinkings/design.md) 🆕
293+
- [小岛问题](./thinkings/island.md) 🆕
293294

294295
### anki 卡片
295296

thinkings/island.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# 小岛
2+
3+
LeetCode 上有很多小岛题,虽然官方没有这个标签, 但是在我这里都差不多。不管是思路还是套路都比较类似,大家可以结合起来练习。
4+
5+
- [200. 岛屿数量](https://github.com/azl397985856/leetcode/blob/master/problems/200.number-of-islands.md)
6+
- [695. 岛屿的最大面积](https://leetcode-cn.com/problems/max-area-of-island/solution/695-dao-yu-de-zui-da-mian-ji-dfspython3-by-fe-luci/)
7+
- [1162. 地图分析](https://leetcode-cn.com/problems/as-far-from-land-as-possible/solution/python-tu-jie-chao-jian-dan-de-bfs1162-di-tu-fen-x/)
8+
9+
上面三道题都可以使用常规的 DFS 来做。 并且递归的方向都是上下左右四个方向。更有意思的是,都可以采用原地修改的方式,来减少开辟 visited 的空间。

0 commit comments

Comments
 (0)