LeetCode200——島嶼的個數

我的LeetCode代碼倉:https://github.com/617076674/LeetCode 原題鏈接:https://leetcode-cn.com/problems/number-of-islands/description/ 題目描述: 知識點:連通分量、深度優先遍歷 思路:深度優先遍歷求連通分量個數 事先設定好私有的成員變量direction來表示島嶼可連接的4個方向,以便於程序
相關文章
相關標籤/搜索