A recursive binary search based function . It returns index of x in given array arr [ l . . r ] is present , otherwise - 1
def binarySearch ( arr , l , r , x ) : NEW_LINE INDENT if ( r >= l ) : NEW_LINE INDENT mid = int ( l + ( r - l ) / 2 ) NEW_LINE DEDENT DEDENT