3 ms·
8-queens : 0.19s user 0.09s system 127% cpu 0.222 total 12-queens : 0.21s user 0.11s system 129% cpu 0.244 total 16-queens : 0.29s user 0.10s system 11
by tacticiankerala 11y ago
8-queens : 0.19s user 0.09s system 127% cpu 0.222 total
12-queens : 0.21s user 0.11s system 129% cpu 0.244 total
16-queens : 0.29s user 0.10s system 119% cpu 0.325 total
20-queens : 2.79s user 0.10s system 102% cpu 2.826 total
24-queens : 7.50s user 0.10s system 100% cpu 7.533 total
Thanks a lot for sharing the Dancing links algorithm. It looks really interesting. I wanted to try sudoku with backtracking,but now I would like to give dancing link a try!
- taeric 11y agoAre those times for finding a solution, or for all solutions? If all, that is truly impressive! Dancing links is a backtracking algorithm, just a nice way to optimize the backtracking.
- tacticiankerala 11y agoIt is for finding the first solution. Sorry that I didn't mention it.
- taeric 11y agoNo worries. I could have guessed, if I'd paid attention to how large of an N you looked at. :) Also, I should explicitly say thanks for sharing! It is fun reading solutions to this puzzle. Also fun to read Erlang.