Question: 1) Write a program to do the following a. Define an array of size (Constant value or passing a value to main method) b. Fill

 1) Write a program to do the following a. Define anarray of size (Constant value or passing a value to main method)

1) Write a program to do the following a. Define an array of size (Constant value or passing a value to main method) b. Fill the array with random numbers between 1-SIZE c. Find how long it takes to search a number from the array d. Find how long it takes to sort using Insertion e. Find how long it takes to sort using Arrays.sort f. Find out how long it takes to search using Arrays.BinarySearch g. Try with array size of (100, 10000, 100000) Insertion Sort public static int[ insertionSort(int] data) // run from second element to last for (int i - l;

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!