Driver method
public static void Main ( ) { int [ ] arr = { 1 , 2 , 3 , 3 , 4 , 5 } ; int index = findRepeatingElement ( arr , 0 , arr . Length - 1 ) ; if ( index != - 1 ) Console . Write ( arr [ index ] ) ; } }