public int removeDuplicates(int[] A) {
			if (A.length == 0) {
				return 0;
			}

			int index = 1;
			int cur = A[0];
			for (int i = 1; i < A.length; i++) {
				if (cur != A[i]) {
					cur = A[i];
					A[index++] = cur;
				}
			}
			return index;
		}