Pregunta de entrevista de Twilio

they asked a graph theory coding question which was leetcode easy - medium range