|
|
|
|
|
by kjeetgill
2833 days ago
|
|
I love this. Writing a sudoku solver is my go to for learning new programming languages. I just write the most basic algorithm: solve obvious squares with only one answer, then guess and repeat. Backtrack your guess if you end up in an unsolvable case. It forces you to touch on enough different language features to really get comfortable. Arrays/basic data structures, calling recursive functions, deep copying stuff, fork/join style parallelization (and cancelation if you want). It's just tricky enough to make you taste some of the code management features like classes and interfaces and the like too. If you're trying to learn OOP vs. functional programming I think it's a great way to really feel the strength and pain points of both. |
|