Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I like Norvig's approach, I'm in the process of porting it to my Lisp.

https://norvig.com/sudoku.html

https://github.com/codr7/eli-java/blob/main/examples/sudoku....



I’ve implemented Norvig for a couple languages as a learning tool.

One thing I do that he didn’t before dropping to brute force though is the m squares with m possibilities check. If two squares in a row, column or group only have two possible values, then you can eliminate those possibilities from all of their siblings. Same for 3:3, 4:4 and 5:5.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: