Google interview question

Questions on DFS and priority queue