Domanda di colloquio di Google

Question on Graphs of medium difficulty level