Pergunta de entrevista da empresa Amazon

Bfs and DFS algorithm questions and complexity calculation