Question d’entretien chez Uber

One question on graphs and algorithm