Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
BobbyTables2
84 days ago
|
parent
|
context
|
favorite
| on:
Arthur Whitney's one liner sudoku solver (2011)
That sounds like 100+ lines in python or similar languages…
throwup238
84 days ago
|
next
[–]
You should be able to do it in under 20 lines using the same matrix operations as the K code via numpy.
anonzzzies
83 days ago
|
parent
|
next
[–]
Numpy is indeed very apl. Just more horrible to me; not python-y and annoyingly verbose for the apl-er.
hrzn
83 days ago
|
prev
|
next
[–]
A few years back I made a modest attempt at writing a concise yet readable sudoku solver in Python - in about 29 lines:
https://github.com/hrzn/sudoku/blob/master/sudoku.py
Could have been made shorter at the price of readability.
forgotpwd16
83 days ago
|
parent
|
next
[–]
Looks nice. Since imports numpy can utilize (more of) numpy's operations to squeeze validation functions and nested fors to one. Should result in shorter code but readability will probably depend on reader's experience in array programming.
otteromkram
84 days ago
|
prev
[–]
It probably isn't. At least, not for Python.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: