News for hackers. Stuff that matters.
Re:N-queen puzzle in 4 lines of Scala by CJefferson on Sunday April 10, 2016 @08:45AM (#11465908)
Also, this is (I think, I'm not 100% up on Scala), insanely inefficient. Usually when people discuss the n-queens problem, they do a backtrack search, stopping as soon as some queen conflicts with an earlier queen.

You can of course then go on and get increasingly clever, but I think you should at least aim for backtracking.

There are no comments on this comment yet.