Question d’entretien chez Uber

Some coding problem based on map