public void findRepetingElementsMethodOne(int[] a) {
	
		/* Keep the aggregate XOR operation */
		int xor = 0;
		
		for (int i = 0; i < a.length; i++) {
			xor ^= a[i];
		}
		
		for (int i = 0; i < a.length - 1; i++) {
			xor ^= i;
		}
		
		/* Isolate the right-most bit set in xor */
		int rightMostBitSet = xor & ~(xor - 1);
		

		/* Revert process to get actual numbers */
		int x = 0, y = 0;
		for (int i = 0; i < a.length; i++) {
			if ((a[i] & rightMostBitSet) > 0) {
				x ^= a[i];
			}else {
				y ^= a[i];
			}
		}

		for (int i = 0; i < a.length - 1; i++) {
			if ((i & rightMostBitSet) > 0) {
				x ^= i;
			}else {
				y ^= i;
			}
		}
		
		System.out.printf("Repeated elements: x: %d y: %d\n", x, y);
	}