alg:variant of Binary Search for search in almost sorted array