Here's a solution to the nQueen's algorithm using bit shifting and bitwise operators.
The algorithm operates on the premise that a chessboard's current state can be represented by 8 bit binary numbers.
[i.e. given n = 4; n empty columns ==== 0000]
The nQueens problem has been tackled by many academics who try to improve the time complexity of the algorithm that finds ways to place any number of queens (represented by n) on an n x n board size.
To see a more thorough explanation of the problem and bit solution, check out: nQueens research
This nQueens solution is implemented in Javascript, to read more about Javascript bitwise operators -- refer to Mozilla's documentation on bitwise operators.
git clone https://github.com/bigthyme/nQueens.git
cd nQueens
After doing this, you can just copy and paste the contents of nQueens.js and paste it into your browser console (or node console) to run the code.