leetcode 827: Making A Large Island 深度优先搜索and二维数组分块技术 (C++)
题目描述:
In a 2D grid of 0s and 1s, we change at most one 0 to a 1.
After, what is the size of the largest island? (An island is a 4-directionally connected group of 1s).
Example 1:
Input: [[1, 0], [...
原创
2018-05-10 23:18:36 ·
1127 阅读 ·
0 评论