Question: ( a ) 3 marks ) What is the running time of interpolation search on A = [ 1 , 2 , . . ,
a marks What is the running time of interpolation search on A n n if we are searching for n Justify your answer.
b marks Suppose A is an array of size and Ali tV i for i where t is some positive number. If we are searching for t in A using interpolation search, in how many iterations does the algorithm terminate? Compare the running time of this search with the average case for evenly spaced data running time of interpolation search. Justify your answer and explain the difference.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
