Created
September 25, 2018 14:34
-
-
Save Spuffynism/c0579545919b2c149b419e1654b9b84f to your computer and use it in GitHub Desktop.
Sudoku semi validator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function validSolution(b){ | |
return f=x=>x.map(v=>eval(v.join`+`)),[...f(b),...f(b[0].map((c,i)=>b.map(r=>r[i])))].every(v=>v==45) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment