Added generic backtracking algorithm, permutations algorithm