Question d’entretien chez Waymo

Hard level Data Structure question related to back-tracking