Find Gap in Sorted Array - Binary Search
def find_first_gap(lst, low , high):
if high - low == lst[high] - lst[low]: return -1
if low + 1 == high: return lst[low] + 1
mid = (low + high) / 2
if mid - low < lst[mid] - lst[low]: #gap in first half
return find_first_gap(lst,low,mid)
else:
return find_first_gap(lst,mid,high)