| Do you have to actually solve a puzzle or just determine if a given 9x9 grid is valid under the rules of sudoku?
If you're just checking for valid grids, a linear search is the simplest way (binary is for sorted lists). Not the most efficient thing in the world, but for evaluating a single 9 by 9 grid it doesn't really matter. Looking for duplicates is probably a little more efficient, but at 6AM I make no promises about my ability to calculate big O.
Solving a puzzle is a lot more complicated and you should read up on how a backtracking search algorithm works. |