Question d’entretien chez Uber

Coding question related to DP and graphs