题37. 解数独

题37. 解数独_第1张图片

题37. 解数独_第2张图片题37. 解数独_第3张图片

Java

class Solution {
  // box size
  int n = 3;
  // row size
  int N = n * n;

  int [][] rows = new int[N][N + 1];
  int [][] columns = new int[N][N + 1];
  int [][] boxes = new int[N][N + 1];

  char[][] board;

  boolean sudokuSolved = false;

  public boolean couldPlace(int d, int row, int col) {

你可能感兴趣的:(#,LeetCode,java,python,c++,c#,golang)