Question: Hi can i get the solution in java language for below question . 1. Create a method that search in an unsorted array of integers

Hi

can i get the solution in java language for below question .

1. Create a method that search in an unsorted array of integers

2. Create a method that search in a sorted array of integers

3. Create an experiment that:

A. will generate 10 large random arrays with 100,000 elements with elements in a large range 1-1,000,000.

B. for each randomly generated array will create two identical copies

C will generate an array with 100,000 values to be searched in the array, alternating a random value from the array with a random value in the range

D. will measure the time to search all the 100,000 values in the first copy using the unsorted method

E. will measure the time to sort the array and search the 100,000 using the binary search

F. will print the result in a table comparing the execution time

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!