impl bitonic search in O(2logn) time
add test