Yandex interview question

implement dfs graph traversal in the algorithmic interview section