Pregunta de entrevista de Uber

Based on graphs and data structures