(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])
What is the formula used for calculating the position in interpolation search?
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
What is the formula used for calculating the position in interpolation search?
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!