Microsoft interview question

backtracking was asked and other dsa basics