Skip to content

Instantly share code, notes, and snippets.

@dps
Last active December 10, 2015 08:28
Show Gist options
  • Save dps/4407942 to your computer and use it in GitHub Desktop.
Save dps/4407942 to your computer and use it in GitHub Desktop.
ShortestSudokuSolver in C written by Oli Charlesworth & Joel Hockey
main(int j,char**V){char*R=V[1],i=0,k=48,x;for(;*R>k;*++R||puts(R-i))++i;
for(;++k<58;*R=1)for(j=81;j--&&R[x=j-i]^k|x%9*(j/9-i/9)*
(j/27^i/27|j%9/3^i%9/3);)!j&&main(*R=k,V);}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment