3 ms·
The issue is going to be in whittling down conflicts, there can be many clues which have at least one valid cross for each cross. If there are even a modest num
by foota 4y ago
The issue is going to be in whittling down conflicts, there can be many clues which have at least one valid cross for each cross. If there are even a modest number of rows/columns (say, N) each with a modest number of solutions (say, M), your performance for checking is going to be very poor. You'll have to backtrack through the solution space I believe trying different possibilities, which should be m^n. For example for n=20 and m=3 you'll have 3^20, which is 3,486,784,401. Certainly not the worst, but this is quite sensitive to the numbers. If you have say 5 solutions on average you're instead looking at 9 * 10^13.