Backtracking is a general algorithm for finding solutions to some computational problems, that incrementally builds candidates to the solutions, and abandons a candidate (“backtracks”) as soon as it determines that the candidate cannot possibly be completed to a valid solution.


An array is a finite collection of similar elements stored in adjacent memory locations. The simplest form of array is a one-dimensional array that can be defined as a finite ordered set of similar type of data.