Bloomberg interview question

Was asked a stack based Algo and a backtracking question.