leetCode #37 Sudoku Solver(BackTracking) | JSer - algorithm and JavaScript

preview_player
Показать описание
#37 Sudoku Solver(BackTracking)

A typical backtracking problem, which is to search one possible valid solution from many possibilities. If the result is simple like a sum/min/max, we could just pass down the result with recursion, like `walk(i, j, result)`, for cases like sudoku solver, the result is complicated and there is only one solution in our problem, so we could just modify the result in-line and stop at the ending condition, so `walk(i, j)` is enough. Just remember to restore the original dataset when found impossible for certain pattern.

Hi I'm a JavaScript engineer who is not good at algorithms,
and currently practicing leetCode online. If you are interested, maybe we can learn together.
Рекомендации по теме
Комментарии
Автор

i wish you had pushed the code onto github or something of that sort but its fine

osm_labrahmi