Open main menu

CDOT Wiki β

Changes

TriForce

32 bytes removed, 09:36, 22 March 2019
Assignment 3
past = added;
int count = 0; //number of values which can fit in this square
int guess = at0; //last value found which can fit in this square
for (int idx = 0; idx < N; ++idx) {
//Ensures that every square in each section is working on a different number in the section
} else {
count++;
guess = num + 1;
rowCount[row][num] ++;
colCount[col][num] ++;
//Find values which can go in only one spot in the section
if (count > 1) { for (int idx = 0; idx < N&& count > 1; ++idx) {
if (notSeen[idx] &&
( rowCount[row][idx] == 1 || boxCount[box][idx] || colCount[col][idx] == 1)) {
count = 1;
guess = idx + 1; }
}
}
 
//One value Must go here
if (count == 1) {
at = guess--+ 1;
rowHas[row][guess] = true;
colHas[col][guess] = true;