subject

To do this you may follow this guideline: 1. Ask users how many numbers he/she wants to sort. The numbers are integer 2. Take that many numbers as inputs from the user and put them in an array 3. Then sort those numbers using the Bubble sort algorithm. Write a Bubble_sort function to do this. Pass the array to that function. (Note that you should copy your original array to another array before calling this function as the function will change your original array, but you need your original array for other sorting function) 3.1. In that function your output should show all the steps that the sorting algorithm is performing in each iteration 4. Repeat the sorting using the Selection sort algorithm. Write a Selection_sort function to do this. Pass the array to that function. 4.1. In that function your output should show all the steps that the sorting algorithm is performing in each iteration 5. You should write a display_array function that takes an array and print the elements. Use this function whenever you need to print the array.

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 19:30, davisparker5269
Write a function processpeople() that takes the name of a file as a parameter. each line of the file corresponds to information about a person. in particular a line contains either a name (in the form lastname, firstname with no spaces in it) or a name (lastname, firstname) and a year. the function will process the file, creating a person object for each line in the file. the function will print information about each line as it processes it, as well as appending the new person object into a list. make sure to use person methods to display information rather than recreating the work you did for the first problem. once the entire file has been processed, the function returns the list of person objects created from the file. if the file is empty, the function should return an empty list. if the input file cannot be opened, the function should print a message to that effect and then return an empty list. the following shows what would be displayed for two example files which have been provided in the link. the file none. txt does not exist. note that your function must work on an arbitrary file that consists of valid lines. you cannot assume anything about the file except that it contains lines that have the format described above.
Answers: 2
image
Computers and Technology, 22.06.2019 10:40, Morghurley2000
"it security policy enforcement and monitoring" respond to the following: describe how monitoring worker activities can increase the security within organizations. describe the rationale that managers should use to determine the degree of monitoring that the organization should conduct. explain the extent to which you believe an organization has the right to monitor user actions and traffic. determine the actions organizations can take to mitigate the potential issues associated with monitoring user actions and traffic.
Answers: 3
image
Computers and Technology, 22.06.2019 19:30, mitalichavez1
When creating a presentation in libre office impress, where does the editing of slides take place? a. the slides panel b. the center panel c. the tasks panel, under the masters pages tab d. the tasks panel, under the layouts tab
Answers: 3
image
Computers and Technology, 22.06.2019 21:30, Nathaliasmiles
The graph shows median weekly earnings for full-time workers according to education level. which can you not conclude?
Answers: 2
You know the right answer?
To do this you may follow this guideline: 1. Ask users how many numbers he/she wants to sort. The nu...

Questions in other subjects: