Question d’entretien chez Jump Trading

Graph theory problem. LC hard.