Pregunta de entrevista de Microsoft

Depth first search, hashmap(worst-case complexity)