private boolean isValid(int row, int column, ArrayDeque<Integer> columns) {
            int r = 0;
            for (int c : columns) {
                if (c == column || Math.abs(c - column) == Math.abs(r - row)) {
                    return false;
                }
                r++;
            }
            return true;
        }