One day, my friend asked me if I still remember the solution of eight queens puzzle.
I told him the answer is no.
In effect, I had never worked on the problem before.
After that chat, I decide to do the math via my new joy Golang.
here is my code:
In the code above , I print the solution on screen, but it is not necessary, you can remove the function visualize then just counting.
In my old ThinkPad E431,
running 8 queens costs less than 1ms. (without print)
running 9 queens costs less than 2ms. (without print)
running 10 queens costs less than 9ms. (without print)
So… is it good enough?