Question: please type out code, thanks 7.16 (Execution time) Write a program that randomly generates an array of 100,000 integers and a key. Estimate the execution

please type out code, thanks
7.16 (Execution time) Write a program that randomly generates an array of 100,000 integers and a key. Estimate the execution time of invoking the linearSearch method in Live Example 7.6. Sort the array and estimate the execution time of invoking the binarySearch method in LiveExample 7.7. You can use the following code template to obtain the execution time: long startTime = System. nanoTime(); perform the task; long endTime = System. nanoTime(); long executionTime = endTime startTimeStep 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
