Question: write in a java programming. 1. Create a text file with 1,000 random integer numbers in the range 1 through 220 as the search keys.

write in a java programming. 1. Create a text file with 1,000write in a java programming.

1. Create a text file with 1,000 random integer numbers in the range 1 through 220 as the search keys. 2. Test the program for array sizes N -16, 32, 64, 220 lnitialize 128, 256, 512,1024, 2048, the array with random integer numbers between the ranges 1 through N and use the same array for testing linear search and binary search. Remember to sort the array before using binary search 3. Compare the execution time for linear search and binary search. Include the time taken for sorting with the binary search time (you have to sort only once for each array size). Use a table or plot to summarize the results and document your observations and explanations in the report

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!