1. Engineering
  2. Computer Science
  3. write in a java programming...

Question: write in a java programming...

Question details

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.write in a java programming.

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution