I've got a hash like this:
Each key represents a row number on a Sudoku board.
Each array in a value represents a possible solution for that row
possibilities = {
1 => [[1, 1, 1], [1, 1, 1], [1, 1, 1]],
2 => [[2, 2, 2], [3, 3, 3], [4, 4, 4]],
3 => [[2, 2, 2], [3, 3, 3], [4, 4, 4]],
...
9 => [[2, 2, 2], [3, 3, 3], [4, 4, 4]]
}
I want to try every single row until we find a combination of rows that solves the puzzle. I'm not quite sure how to do the permutation.
Any ideas?