alglus / sudoku-solver Goto Github PK
View Code? Open in Web Editor NEWA solver for sudokus of different sizes, written in haskell.
License: GNU General Public License v3.0
A solver for sudokus of different sizes, written in haskell.
License: GNU General Public License v3.0
When converting a sudoku of size L into a cover problem, a matrix is generated with the size:
So for a 25x25 sudoku the rows list is already 15625 elements long. Every access to an element becomes very expensive.
So an idea is to somehow split the list into k sub-lists and access the one corresponding to the desired index. This would reduce the time complexity from O(n) to O(k + n/k)
Currently the minimal column is calculated with the function updateCols
. It has a time complexity of O(n*m), which is not ideal.
This was a quick fix for a bug when decrementing or incrementing each column size after covering a cell.
The problem was, that after some rounds of backtracking, some column had a size of n>0, but no uncovered cells left. So the function head
run into an error.
Correct this bug and change the size of each column directly when cov/uncovering a cell. Then just go through the columns list and search for the minimum, which would be O(n).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.