N Queen Problem Analysis

The N Queen is the problem of placing N chess queens on an N×N chessboard so that no two queens attack each other. For a larger N, this problem couldn’t be solved in polynomial time. So, it is an NP-Complete problem. However, this problem could be solved by backtracking in non-polynomial time for a […]


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. Unlike Physics, we could have multidimensional arrays having more than 4 dimensions. It is […]