searching and sorting.

Job ID: 34996168

Budget: $10 – $30 CAD

Learning Objectives
To understand searching and sorting.
You can do all this in one driver program.
Part 1:
1. Create an unsorted array containing 40 random integers between 1 and 999.
2. Print the contents of this array using the toString method from Arrays class.
3. Call the sort method from the Arrays class to sort this array.
4. Print the contents of this sorted array using the toString method from Arrays class.
5. Use this sorted array to perform the following binary searches.
6. Try the binarySearch method from Arrays to search for a few target values in the array, and for a value not in
the array. Consult the online documentation on the binarySearch method in Arrays to help you answer these
questions:
a. What value is returned by the binarySearch method?
b. What is the significance of this value?
c. What is the significance of the value returned when the target is not in the array?

7. Explain how linear search works and be able to trace its execution.
8. Explain how Binary search works and be able to trace its execution
9. Explain how Sequential sorts works and be able to trace there execution.
10. Explain how Logarithm sorts works and be able to trace there execution