Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You ar to wmie Ctpa ecat alie of 15,000 unique random numbers between 1 and 50,000. Randomly pick 5,000 of these numbers to search for
You ar to wmie Ctpa ecat alie of 15,000 unique random numbers between 1 and 50,000. Randomly pick 5,000 of these numbers to search for (generate a random number between 1 & 15,000 as an index to the array), select that number out of the array, then search for the number using the interpolation search. Do this 5000 times. Compute the average number of probes needed to fine these values. Print the theoretical value for the interpolation search and see if you are close to that value. The list of random numbers will need to be sorted before you start your searching You ar to wmie Ctpa ecat alie of 15,000 unique random numbers between 1 and 50,000. Randomly pick 5,000 of these numbers to search for (generate a random number between 1 & 15,000 as an index to the array), select that number out of the array, then search for the number using the interpolation search. Do this 5000 times. Compute the average number of probes needed to fine these values. Print the theoretical value for the interpolation search and see if you are close to that value. The list of random numbers will need to be sorted before you start your searching
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started