private boolean validate(int row, int[] board) {

		for (int i = 0; i <= row; i++) {
			for (int j = i + 1; j <= row; j++) {
				if (board[i] == board[j]) {
					return false;
				}
				if (Math.abs(board[i] - board[j]) == Math.abs(i - j)) {
					return false;
				}
			}
		}
		return true;
	}