Question d’entretien chez Didi Chuxing

Tree backtracking question using C++