Reference no: EM131005551
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.
Describe the concept of social mobility
: List and describe the components of Social Stratification. Compare and Contrast the class and caste systems?
|
Explain the steps in the consumer decision-making process
: Explain habitual decision making, limited problem solv- ing, and extended problem solving. What is the role of perceived risk in the decision process? Explain the steps in the consumer decision-making process
|
During an economic recession
: During an economic recession, discuss how management's or a union's bargaining power might be affected. Give an appropriate business example to illustrate what you mean
|
Calculate the ratio of the depletion region width w
: Calculate the ratio of the depletion region width W under a forward bias of 0.3 V to the equilibrium width W0, for a GaAs abrupt p-n junction with a doping level on the p-type side of NA= 2 x 1017 cm·3 and a doping level ..
|
Create a search function that can search for an integer
: 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.?
|
Why star delta starter is preferred with induction motor
: Why star delta starter is preferred with induction motor? State the difference between generator and alternator. Why AC systems are preferred over DC systems? How can you relate power engineering with electrical engineering? What are the various kind..
|
Scientific method to understand
: As a relatively young discipline, sociology has most ambitious aims: to use the scientific method to understand, generalize and predict social behavior.
|
Applying nscs scholarship
: Please answer two questions. It is for applying NSCS scholarship. (respond in 300-450 words)
|
What is the decision facing electrolux
: Marketing in action Case - Real Choices at Electrolux - What is the decision facing Electrolux? What factors are important in understanding this decision situation
|