public boolean isValid(int row, int col, int[] queen) {
		for (int i = 1; i < col; i++) {
			if (queen[i] != 0
					&& (queen[i] == row || (Math.abs(i - col) == Math
							.abs(queen[i] - row)))) {
				return false;
			}
			
		}
		return true;
	}