Google interview question

Write a recursive DFS