3 ms·
> I can copy values with values.copy() which is simple and efficient. If I implemented a possibility as a Python set or list I would need to use copy.deepcopy(v
by gopalv 7y ago
> I can copy values with values.copy() which is simple and efficient. If I implemented a possibility as a Python set or list I would need to use copy.deepcopy(values), which is less efficient.
The array deepcopy isn't too bad, at least when writing code, it compressed into a neat slice [:]
I wrote a hinter[2] which was more fun than the actual solver too, because it shows the "minimum remaining values" as a colour coded chart.
[1] - http://notmysock.org/code/sudoku/solver.py http://notmysock.org/code/sudoku/solver.py
[2] - http://notmysock.org/code/sudoku/ http://notmysock.org/code/sudoku/