Returns index of second appearance of a repeating element . The function assumes that array elements are in range from 1 to n - 1.
static int findRepeatingElement ( int [ ] arr , int low , int high ) {