Ajira interview question

A routing problem with backtracking.