Google interview question

The question was based on graph and binary trees.