Google interview question

Implementing graph traversal methods