An interesting problem on Search

Revision en1, by wish_me, 2017-08-26 22:45:15

Given an array of size N, there exist a pattern such that, a[i]-M <= a[i+1] <= a[i]+M . Suggest an algorithm to search for a number in the given array. The solution should be better than O(n).

Tags array, search

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English wish_me 2017-08-26 22:45:15 229 Initial revision (published)