Pregunta de entrevista de Increff

Graph question without topological sorting technique