A recursive binary search function . It returns location 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 return - 1 NEW_LINE DEDENT mid = int ( l + ( r - l ) / 2 ) NEW_LINE DEDENT