Pergunta de entrevista da empresa Amazon

BFS and DFS and time and space complexity