Pregunta de entrevista de Google

A graph question..... don't remember exactly