Amazon Interview Question

1) Why you used DFS to solve the questions? 2) Time complexity 3) Space complexity