design patterns, backtracking | permutatation