public int removeDuplicates(int[] A) {
		int n = A.length;
		if (n == 0)
			return 0;
		int prev = A[0];
		int count = 1;
		for (int i = 1; i < n; i++) {
			if (A[i] != prev) {
				prev = A[i];
				A[count] = A[i];
				count++;
			}
		}
		return count;
	}