a*d 发帖数: 47 | 1 An array is bitonic if it is comprised of an increasing sequence of integers
followed immediately by a decreasing sequence of integers.
Given a bitonic array a of N distinct integers, describe how to determine
whether a given integer is in the array in O(log N) steps |
h***9 发帖数: 45 | 2 二分法找到2段序列的分界点 O(log N),
然后用二分法在每段序列里面分别找 O(log N)。
integers
【在 a*d 的大作中提到】 : An array is bitonic if it is comprised of an increasing sequence of integers : followed immediately by a decreasing sequence of integers. : Given a bitonic array a of N distinct integers, describe how to determine : whether a given integer is in the array in O(log N) steps
|
s***e 发帖数: 793 | 3 1L is right. You need to find the peak and search two subarray.
integers
【在 a*d 的大作中提到】 : An array is bitonic if it is comprised of an increasing sequence of integers : followed immediately by a decreasing sequence of integers. : Given a bitonic array a of N distinct integers, describe how to determine : whether a given integer is in the array in O(log N) steps
|