def search(arr, l, r, x): if r >= l: m = (l+r)/2 if arr[m] == x: return m if arr[m] > x: return search(arr, l, m-1, x) else: return search(arr, m, r, x) return -1 def exponentialSearch(arr, n, x): if arr[0] == x: return 0 i = 1 while i