update search-insert-position using binary search