Question: Write Java programs for following: 1. Create an array. Sort it in ascending order using Selection Sort method. Search for an element in the array

Write Java programs for following: 1. Create an array. Sort it in ascending order using Selection Sort method. Search for an element in the array using Binary Search method. Display the location of the element if found, else display an appropriate message. The program should also display the sorted array. 2. Create an array. Sort it in descending order using Insertion Sort method. Search for an element in the array using Binary Search method. Display the location of the element if found, else display an appropriate message. The program should also display the sorted array. 3. Create two arrays A and B, containing integers. Sort both the arrays in ascending order using any sorting method. Create one more array C, which will have the contents of A merged with the contents of B in the ascending order. Display all three arrays. 4. Create an array. Sort it in ascending order using Shell Sorting. Display the original and the sorted array
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
