結果 : write recursive and iterative algorithm for backtracking method