def arc_consistent(puzzle): state = parse_puzzle(puzzle) result, num_nodes = arc_consistent_helper(state) if result['Solved']: return unparse_puzzle(result), num_nodes else: None, None
def backtracking(puzzle): state = parse_puzzle(puzzle) result, num_nodes = backtrackingHelper(state) if result['Solved']: return unparse_puzzle(result), num_nodes else: return None, None