Analysis of algorithms
暂无分享,去创建一个
3. Binary search has the following algorithm. Look at the middle element in an array. If the element is the one begin looked for (the target), return FOUND. Otherwise, if the element is greater than the target, recursively search the lower half of the array. Otherwise, recursively search the upper half of the array. If the array consists of three or fewer elements, perform a linear search of the array, returning FOUND if found and MISSING otherwise. Which of the following recurrence equations describe binary search?