Description Usage Arguments Examples
View source: R/sudoku-solver.R
This function can return all legal solutions to an unsolved puzzle
1 | get_all_solutions(sudoku_matrix, stop_early = FALSE, ...)
|
sudoku_matrix |
an unsolved sudoku, in matrix form, with NA values for empty cells |
stop_early |
set to TRUE if you want to stop once you've found one solution, false if you want to return all solutions. Defaults to TRUE For puzzles with few clues (fewer than 25), attempting to return all solutions can take a long time. |
... |
additional arguments to pass to solver. |
1 2 3 | random_puzzle <- generate_puzzle(seed = 56, clues = 30)
all_solutions <- get_all_solutions(random_puzzle)
length(all_solutions)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.