![]() The algorithm used for solving Sudoku puzzle, is simple recursion. Int sudoku = acq_sudoku_convertgrid(grid, size) ĪCQ.(sudoku, solutions, max_count) Public static int acq_sudoku_solution_count(object grid) ![]() Since we don't want Excel to show zeros, we convert int array to array of objects and replace zeros with empty strings. Elements equal to zero in this array represent empty Sudoku cells. We call it from Excel wrapper function by first checking the seed argument. The function stops counting solutions after 1024 are found. Normally, there should be only one solution, but if you manually remove digits from the puzzle, number of possible solutions goes up.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |