Flexport interview question

An easy question about a combination using backtracking