Tag Archive: binary search

Bitonic search

Given a bitonic array, we need to determine if a number is part of the array or not. This is actually a triple binary search problem: finding the peak spot and then finding… Continue reading

Fun with binary search

Everybody knows binary search. Now, two problems with a twist: Count the number of elements smaller than a given value in a sorted array Count the number of elements equal to a given… Continue reading