Question d’entretien chez Amazon

First question was leetcode medium involving graphs