Intel Corporation interview question

Basic graph traversal