Given an infinite length sorted array having both positive and negative integers. Find an element in it.
EDIT
All the elements in the array are
Just my 2 cents. We have an infinite array thus lets imagine that we are looking for very big number. Did you imagine? Well it's ever much more bigger. Note that length of interval to binary search in is 2^i = 2^(i+1)-2^i
thus it should take log(2^i)=i
time to find the number. On the other hand it takes i
time to reach the target interval. So the total time complexity is O(n)
again. What I'm missing?