Question: using JAVA Objectives: In this lab, the following topic will be covered: 1. Searching 2. Sorting Task Write a program that creates an array of
using JAVA
Objectives: In this lab, the following topic will be covered: 1. Searching 2. Sorting Task Write a program that creates an array of numbers from 1 to 100,000,000 in ascending order. Display the execution time of invoking the linear search method and the binary search method. Display the execution time of invoking both searches for the following numbers: 1; 25,000,000; 50,000,000; 75,000,000; 100,000,000. You can use the following code template to obtain the execution time: long start Time = System.oanotime(); /**perform the task*/ | long endTime System.Danelime(); long executionTime endtime startTime; =
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
