2022-06-02
Description
Input: grid = [
["1","1","1","1","0"],
["1","1","0","1","0"],
["1","1","0","0","0"],
["0","0","0","0","0"]
]
Output: 1Input: grid = [
["1","1","0","0","0"],
["1","1","0","0","0"],
["0","0","1","0","0"],
["0","0","0","1","1"]
]
Output: 3Solution
Approach #0: BFS
Approach #1: DFS
Description
Solution
Approach #0
Approach #1
Description
Solution
Approach #0
Approach #1: Recursive
Last updated


