Domanda di colloquio di C3 AI

Graph problem which I have not well prepared.