Integer[] merge2(Integer[] data1, Integer[] data2) {
		// 1. no need to merge when one queue is empty
		if (data1 == null)
			return data2;
		if (data2 == null)
			return data1;

		// 2. merge
		int p1 = 0, p2 = 0, m = 0;
		Integer[] mrgData = new Integer[data1.length + data2.length];
		while (p1 < data1.length && p2 < data2.length) {
			if (data1[p1] < data2[p2]) {
				mrgData[m++] = data1[p1++];
			} else {
				mrgData[m++] = data2[p2++];
			}
		}

		// 3. handing remaining data still in the queue.
		while (p1 < data1.length) {
			mrgData[m++] = data1[p1++];
		}
		while (p2 < data2.length) {
			mrgData[m++] = data2[p2++];
		}
		return mrgData;
	}