public void merge(int[] a, int[] b, int lastA, int lastB) {

		int iA = lastA - 1;
		int iB = lastB - 1;
		int iM = lastA + lastB - 1;

		while (iA >= 0 && iB >= 0) {
			if (a[iA] > b[iB]) {
				a[iM] = a[iA];
				iA--;
			} else {
				a[iM] = b[iB];
				iB--;
			}

			iM--;
		}

		// need to move arrayB, no need for a,since they are there.
		while (iB >= 0) {
			a[iM] = b[iB];
			iB--;
			iM--;
		}

	}