This problem statement contains images that may appear incorrectly or not appear at all in some plugins. In that case, use the standard view in the arena to see it correctly.
Little Johnny has just learned about Sudoku, but finds these puzzles annoyingly hard, so he plays a much simpler version. He plays on a 4x4 table where each cell is either empty or contains a single number between 1 and 4, inclusive. The purpose of the game is to fill the entire table with numbers so that each row, each column, and each 2x2 square (labeled A, B, C, and D in the picture below) contains each of the numbers 1, 2, 3, and 4 exactly once.
You are given a String[] board. The jth character of the ith element of board represents the cell at row i, column j. The '-' character represents an empty cell. Cells that are filled with numbers are represented by the characters '1', '2', '3', and '4'. Return the number of different ways this puzzle can be solved.
|