Google interview question

Trees and graphs. Practice them very much.