| You could scan a row/col for 1-9, adding up the total number of each number like so:
int [] check = new int[9];
as you scan a row, keep track of totals like:
check[n - 1]++;
where n is the number you just read in.
check[0] would contain the total number of 1s.
check[1] would contain the total number of 2s.
etc.
if each element in the array is 1, then you're good, else, you're not.
__________________
In Soviet Russia, Exception throws you!
|