O(lg n) binary search in sorted array with duplications