subject

Aprogram is written that reads a list of numbers from afile, writing them into a vector ofints. assume that the filecontains n numbers. the program thencomputes the average of the numbers, using thevector. it then sorts the numbers, using a bubble sortalgorithm. finally, it prints the average and thesorted list to a second file.
(a) which operations are done just once in thisalgorithm?
(b) which operations are repeated ntimes?
(c) which operations are repeated n2 times?
(d) what is the asymptotic complexity ofthis program's algorithm? express your answer in big-onotation.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:00
Businesses allocate resources for their best and most productive uses. the more a resource, the more costly it will be. a manufacturer that requires scarce and costly resources is likely to charge for its products.
Answers: 2
question
Computers and Technology, 22.06.2019 11:00
Which action is good business etiquette? a. switching your cell phone off before you enter a meeting b. keeping your cell phone on low volume before you enter a meeting c. setting a pleasant ring tone on your cell phone before you enter a meeting d. setting a standard ringtone on your cell phone before you enter a meeting
Answers: 1
question
Computers and Technology, 23.06.2019 10:00
Now, open this passage to read about fafsa requirements. describe the information you will need to provide in order to complete a fafsa. list at least three of the required documents you must include.
Answers: 3
question
Computers and Technology, 23.06.2019 19:30
2. fluorine and chlorine molecules are blamed fora trapping the sun's energyob forming acid rainoc producing smogod destroying ozone molecules
Answers: 2
You know the right answer?
Aprogram is written that reads a list of numbers from afile, writing them into a vector ofints. assu...
Questions
Questions on the website: 13722362