This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class nQueen { | |
| /**Solves the N queen problem for any squared board. | |
| * solve() returns true when it finds a solution. | |
| * in valid() you can set certain slots invalid in | |
| * order to observe different solutions. | |
| * 0 --> Empty slot. | |
| * 1 --> A queen. | |
| */ |