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