public void sortColors(int[] A) {
		int zeros = 0;
		int ones = 0;
		int[] B = new int[A.length];
		// B = A.clone();
		for (int i = 0; i < A.length; i++) {
			B[i] = A[i];
			if (A[i] == 0) {
				zeros++;
			} else if (A[i] == 1) {
				ones++;
			}
		}

		int red = 0;
		int white = zeros;
		int blue = zeros + ones;
		for (int i = 0; i < B.length; i++) {
			if (B[i] == 0) {
				A[red] = 0;
				red++;
			} else if (B[i] == 1) {
				A[white] = 1;
				white++;
			} else {
				A[blue] = 2;
				blue++;
			}
		}
	}