public interface DriverInterface
LinearSearch.java
and BinarySearch
classes.Modifier and Type | Method and Description |
---|---|
int[] |
getListOfNumbers()
This method will generate and return a sorted array of
int values
starting at 1 and ending at 10,000,000. |
int[] |
getTargets()
This method will return an
int array containing the following values:
500
10,000
100,000
1,000,000
5,000,000
7,500,000
10,000,000
|
RunTime |
runBinarySearch(int[] listOfNumbers,
int target,
int numberOfTimes)
This method should create an instance of the
BinarySearch.java class and
run the search for the specified target in the listOfNumbers
a total of numberOfTimes . |
RunTime |
runLinearSearch(int[] listOfNumbers,
int target,
int numberOfTimes)
This method should create an instance of the
LinearSearch.java class and
run the search for the specified target in the listOfNumbers
a total of numberOfTimes . |
int[] getListOfNumbers()
int
values
starting at 1 and ending at 10,000,000.int
array containing the numbers from 1 to 10,000,000.int[] getTargets()
int
array containing the following values:
int
array containing the values specified above.RunTime runLinearSearch(int[] listOfNumbers, int target, int numberOfTimes)
LinearSearch.java
class and
run the search for the specified target
in the listOfNumbers
a total of numberOfTimes
.listOfNumbers
- An int
array containing the numbers to search through.target
- The number we will search for.numberOfTimes
- The number of times to conduct the search.RunTime
class that was used to save the
measured runtimes for the linear searches performed.RunTime runBinarySearch(int[] listOfNumbers, int target, int numberOfTimes)
BinarySearch.java
class and
run the search for the specified target
in the listOfNumbers
a total of numberOfTimes
.listOfNumbers
- An int
array containing the numbers to search through.target
- The number we will search for.numberOfTimes
- The number of times to conduct the search.RunTime
class that was used to save the
measured runtimes for the binary searches performed.