Pregunta de entrevista de CLEAR

Some island/graph/DFS leetcode question for the online test