Add simplified version for binary search on intervals.