Backtracking

An algorithmic technique for solving problems incrementally by trying partial solutions and backtracking on failure.