This is an implementation of the famous N Queens problem in Java. This uses the concept of Recursive Backtracking.
This class uses a helper function place() which returns true if the Queen can be placed in the given co ordinates.
positionInRow - This array will hold the column value of placed Queens where the index of the cell will indicate the row value.
You can change the value of gridSize in the main() function and get the placement co ordinates for any given grid size.