Question d’entretien chez Amazon

1) One programming question on graph