Find Us On: Facebook Twitter Rss Feed Blog
Need To Register? Sign Up Login

Soduko, 9x9 Grid

yen
yen 


I have to do this homework, due on Nov 7. I have so many midterms coming from other classes. There is no much time left to invest in this homework. Any help would be much appreciate. Thank you Attachments Tags
Clarifications

Answers

Homework5: Sudoku solution

felo
felo 



Sudoku is just a puzzle, but the backtracking
technique for solving it is used in many important application domains.
To solve a Suduku without backtracking,
Attachments
sudoku.png (118 K) Download Preview

hww5.zip (4 K) Download
Preview
Evaluation {

Preview
the flag Boolean[] flag = new Boolean[10]; // set all to false Arrays.fill(flag, false); for (int i = 0; i < in.length; i++) { // ignore case 0 if (in[i] == 0) { } else { if (flag[in[i]]) { return true; } else { flag[in[i]] = true; } }

Preview
class Solver { private Grid problem; private ArrayList<Grid> solutions; public Solver(Grid problem) { this.problem = problem; } public void solve() { solutions = new ArrayList<>(); solveRecurse(problem); } // // FINISH THIS. // // Standard backtracking recursive solver. // private void solveRecurse(Grid grid) { Evaluation eval = evaluate(grid); if (eval ==

Preview
".........", ".........", "........." }; private final static String[] REJECT_3 = { "3........", "..3......", ".........", ".........", ".........", ".........", ".........", ".........", "........." }; private final static String[] REJECT_4 = { ".........", ".........", ".........", "....4....", ".....4...", ".........", ".........", ".........", "........." }; private final static String[] CONTINUE = { "123456789", ".........",

Screenshots
Screenshot
Purchase Answer