Create a mastersort function that will call the appropriate


Question: Algorithm Concepts

Project 1 - Sorting Algorithm

Work in teams of up to 3 to create a set of algorithms in Java (or Python, or C++, or php). The algorithms you implement are the following:

- two sorting algorithms
- one search algorithm

The sorting algorithms receive an array of input integers and sort them. The input array may be read from a file or directly from the user/ keyboard (your choice). The number of integers in the array may be up to 100,000.

The search function receives a number and confirms whether the number is in the array or not.

Requirements:

. Create two different sort functions (insertionSort, merge sort,quickSort...) which take an array and the array length. The algorithms you choose must be efficient.

. They should sort the array into ascending order.

. They should print the elements of the array (using a loop and the ? System.out.print(x) function).

. Create a "masterSort" function that will call the appropriate sort function depending on the length of the array. ?

. Create a "search" function that can search for an integer in the array.?

. Take input from the user - "Enter a number to search for in the array". ?

. If the number is in the array print "Yes, the number you entered is in the array" otherwise print "No, the number you entered is not in the array".

Documentation:

There should be a comment above each line of algorithm code explaining what is happening at each step

At the top of the file, as a comment, you must include:

- The name and student numbers of members of the group

- Information about how exactly to run and use the program.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Create a mastersort function that will call the appropriate
Reference No:- TGS01352594

Now Priced at $35 (50% Discount)

Recommended (92%)

Rated (4.4/5)