Question: In Java, write your own methods to do the following: LinearSearch BinarySearch SelectionSort MergeSort InsertionSort BubbleSort On the given array with the following elements ;
In Java, write your own methods to do the following:
LinearSearch
BinarySearch
SelectionSort
MergeSort
InsertionSort
BubbleSort
On the given array with the following elements ;
Array : 87, 39, 3, 5 ,9 ,7 ,27,1 , 8 ,6 (use this Array as data for all methods except the BinarySearch method).
All your methods will be in a class.
Write a tester program that will call each of the listed methods from the class above using the given Array as data.
For the binary search method, use this Array : 1, 3, 5, 6, 7, 8, 9, 27, 39, 87
For the Linear Search and Binary search, the user will input the search item in the program
The program should say if the search was successful or a failed search, if the search was successful, then the program should return the index of the search item and the item.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
