--- tags: AC LeetCode 刷題讀書會 - 2023 --- # 2023/07/30(日) 每週 LeetCode 刷題 ## 刷題題號 - [200. Number of Islands](https://leetcode.com/problems/number-of-islands/) ## 解題思路 Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water. <pre style='background-color:#ggg'> 給予一個 m x n 的二維網格叫做 grid,這個網格中 "1" 代表陸地和 "0"代表水,回傳島嶼的數量。 這個島嶼四面環水,相鄰陸地水平或垂直連結而成。 您可以假設網格的所有四個邊緣皆被水包圍。 </pre> ## 回報格式 - 請 Fork 此 Replit 連結(https://replit.com/@AllenLi23/AC-LeetCode-Js-200-Number-of-Islands)後,進行程式碼解題,並於完成後更新到 Replit 中,再將連結貼至「解題分享區」來與大家交流做法。 解題分享區 --- 讀書會議流程: ex. 21:05開始 #簽到表: https://docs.google.com/spreadsheets/d/1gc16rrF-yZNs845z_nYrdgDIiSECOJok30dNLyQm69A/edit#gid=534323210 1. 題目說明。 2. 題目解析(BigO(n ^ 2))。 4. 成員分享解題思路。 5. 問題與討論。 <!-- No.0 (請依序排序下去) name: name (回報範例) lighthouse: lighthouse Replit:https://replit.com/@AllenLi23/AC-LeetCode-Js-200-Number-of-Islands-Allen --> <!-- No.1 name: vanessa lighthouse: mali7591@hotmail.com Replit:https://replit.com/@vanessalin3/AC-LeetCode-Js-200-Number-of-Islands#index.js --> <!-- No.2 name: bun lighthouse: bun.coding@gmail.com Replit:https://replit.com/@Shu-YinChen/AC-LeetCode-Js-200-Number-of-Islands#index.js --> <!-- No.3 name: Ben lighthouse: a84012807@gmail.com Replit:https://replit.com/@a84012807/AC-LeetCode-Js-200-Number-of-Islands#index.js --> <!-- No.4 name: Jack Hung lighthouse: lhhungx@gmail.com Replit:https://replit.com/@LungHsuanHung/AC-LeetCode-Go-200-Number-of-Islands#solution/solution.go -->