private static int getMedianOfTwoSortedArraysNotWorking(int a[], int b[]) {
		int leftPointer = 0;
		int rightPointer = a.length - 1;
		int median = (a.length + b.length) / 2;

		while (leftPointer <= rightPointer) {
			int leftPositionSortedIndexInOtherArray = TreeUtils
					.findSortedPositionIndex(b, a[leftPointer]);
			int leftPointerPositionInSortedArray = leftPositionSortedIndexInOtherArray
					+ leftPointer;

			if (leftPointerPositionInSortedArray == median) {
				return a[leftPointer];
			}

			if (leftPointerPositionInSortedArray > median) {
				return b[leftPositionSortedIndexInOtherArray
						- (leftPointerPositionInSortedArray - median)];
			}

			int rightPositionSortedIndexInOtherArray = TreeUtils
					.findSortedPositionIndex(b, a[rightPointer]);
			int rightPointerPositionInSortedArray = rightPositionSortedIndexInOtherArray
					+ rightPointer;

			if (rightPointerPositionInSortedArray == median) {
				return a[rightPointer];
			}
			if (rightPointerPositionInSortedArray <= median) {
				return b[rightPositionSortedIndexInOtherArray - 1
						+ (median - rightPointerPositionInSortedArray)];
			}

			int origLeftPointer = leftPointer;

			int tmp = rightPointer
					- (rightPointerPositionInSortedArray - median);
			if (tmp > leftPointer) {
				leftPointer = tmp;
			} else {
				leftPointer++;
			}

			tmp = origLeftPointer + (median - leftPointerPositionInSortedArray);
			if (tmp < rightPointer) {
				rightPointer = tmp;
			} else {
				rightPointer--;
			}
			// leftPointer++;
		}
		return -1;
	}