Member-only story
從LeetCode學演算法 - 118 DFS (20) /BFS (5) / Queue (6)
0934. Shortest Bridge (Medium)
寫在前面:
(基礎+進階+面試篇)從 LeetCode 學演算法 + 面試成功指南
(3591元 特價中: 2023/06/30 23:59後截止)
https://hiskio.com/bundles/eCP23B397?s=tc
(3990元 長期有效) https://bit.ly/lc2022all
容筆者工商一下,
「從Leetcode學演算法|進階篇」這次選了40道難度加深的LeetCode題目,
同樣也會細部解說對應的技巧及須要掌握的演算法!
同時這次購買進階篇的話,
額外還加贈「從Leetcode學演算法|面試篇」!
當中包含了面試準備須知分享,及訪談國內外不同經驗的工程師,
讓你不論是想走前端/後端/一般軟工或者是想找國外的工作,
是初學想轉職還是正在工作,都能夠從中得到收穫呦!
有興趣的朋友可以使用下面的優惠~
「從Leetcode學演算法|進階篇」+「從Leetcode學演算法|面試篇」:
https://bit.ly/lc2022adv
請幫我隨手點開下面的SHOW EMBED並按5個like~
喜歡的話也可以幫我拍拍手~
(按讚不用錢,感謝支持寫作~)
Question:
You are given an n x n
binary matrix grid
where 1
represents land and 0
represents water.
An island is a 4-directionally connected group of 1
's not connected to any other 1
's. There are…