MCQOPTIONS
Saved Bookmarks
| 1. |
What is the formula used for calculating the position in interpolation search? |
| A. | (x = element being searched, A[] = input array, low and high are the leftmost and rightmost index of A[] respectively) |
| B. | ((x – A[low]) * (high – low)) / (A[high] – A[low]) |
| C. | high + ((x – A[low]) * (high – low)) / (A[high] – A[low]) |
| D. | low + ((x – A[low]) * (high – low)) / (A[high] – A[low]) |
| E. | x + ((x – A[low]) * (high – low)) / (A[high] – A[low]) |
| Answer» D. | |