public int maxProduct(int[] A) {
			int pre = -1;
			int max = Integer.MIN_VALUE;
			for (int i = 0; i < A.length; i++) {
				if (A[i] == 0) {
					int blockMax = Integer.MIN_VALUE;
					if (pre + 1 <= i - 1) {
						blockMax = getMaxWithoutZero(A, pre + 1, i - 1);
					}
					if (blockMax < 0) {
						blockMax = 0;
					}
					if (blockMax > max) {
						max = blockMax;
					}
					pre = i;
				}
			}
			// the last block
			if (pre != A.length - 1) {
				int blockMax = getMaxWithoutZero(A, pre + 1, A.length - 1);
				if (blockMax > max) {
					max = blockMax;
				}

			}

			return max;
		}