【LeetCode & 劍指offer刷題】回溯法與暴力列舉法題6:Number of Islands
阿新 • • 發佈:2019-01-06
【LeetCode & 劍指offer 刷題筆記】目錄(持續更新中...)
Number of Islands
Given a 2d grid map of '1' s (land) and '0' s (water), count 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.C++ 類似題目: 13 機器人的運動範圍 Word Search(系列) 這道求島嶼數量的題的本質是求矩陣中連續區域的個數