Pregunta de entrevista de Bloomberg

I was asked 2 graph problems