Pregunta de entrevista de NVIDIA

coding part: the classic DFS question about island, which can be found in Leetcode