Question: using java programming language. do not use array class!! you can take as much time as you want dont use the Arrays.sort() method, do the
Q1) Write an array class that implements the search and sort methods discussed in the classroom. Then write a program to test your class. 1. Create an int Array of Size 10,000,000 2. generate random values between 1 and 10000 and store them in the array. 3. Implement the sort method discussed in class and use it to sort the array. 5. Implement search methods discussed in class (linear search and binary search). 6. Generate an array of 50000 keys each in the range (1 to 10000). Then search for each key using both searching techniques and record in another array the number of steps needed to find each key and the time the algorithm took to find the result. Then print the best case, the average case, and the worst case for both search algorithms in terms of the number of steps and the time needed to find a solution. -generate an array of 5000 keys in the range of 1 to 10000, then search for each key using both linear and binary seach (separately) and record it in another array (one for linear one for binary). - Recored in a new array the number of steps needed to fine each key, and in another array the time it toke to fined them. -Then print the best, worst, and average case in terms of number of steps and the time it needed to fine solution
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
