chaddotson/puzzles — pull request #2 by jackhftang (2014-11-09 06:51:14+00:00)
Title: Correction of node.js algorithm

isValidPosition() in javascript is now modified to allow early escape (no need to run for all nQueenPositions). This is the same behavior as python version.

Also, I add a script to run the test. Very raw. only compare javascript and python. This is the result on my machine.
```
=== testing 8 ===
N-Queens Found 92 Solutions in 0.008s on a 8x8 board.
N-Queens Found 92 Solutions in 0.093946s on a 8x8 board

=== testing 9 ===
N-Queens Found 352 Solutions in 0.019s on a 9x9 board.
N-Queens Found 352 Solutions in 0.152231s on a 9x9 board

=== testing 10 ===
N-Queens Found 724 Solutions in 0.075s on a 10x10 board.
N-Queens Found 724 Solutions in 0.305623s on a 10x10 board

=== testing 11 ===
N-Queens Found 2680 Solutions in 0.389s on a 11x11 board.
N-Queens Found 2680 Solutions in 0.769967s on a 11x11 board

=== testing 12 ===
N-Queens Found 14200 Solutions in 2.158s on a 12x12 board.
N-Queens Found 14200 Solutions in 3.063053s on a 12x12 board

=== testing 13 ===
N-Queens Found 73712 Solutions in 12.887s on a 13x13 board.
N-Queens Found 73712 Solutions in 16.234737s on a 13x13 board
```
node.js consistantly beat pyp slightly. Please update the result in blog.