Pregunta de entrevista de Magic Leap

A leetcode question about matrix and dfs.