Medium · Matrix / DFS
Number of Islands
Mark connected land cells with recursive traversal.
Reference test case
Input: [2, 7, 11, 15], target = 9 Expected output: [0, 1]
Medium · Matrix / DFS
Mark connected land cells with recursive traversal.
Input: [2, 7, 11, 15], target = 9 Expected output: [0, 1]