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 20:00
Which type of file can be used to import data into a spreadsheet?
Answers: 1
question
Computers and Technology, 23.06.2019 04:31
This graph compares the cost of room and board at educational institutions in texas.
Answers: 1
question
Computers and Technology, 23.06.2019 23:30
Perform an online search about the booting process of a computer and list all the steps
Answers: 2
question
Computers and Technology, 24.06.2019 04:30
The ieee 802.11: defines standards for wireless local area network (wlan) communication protocols. identifies various computers or devices connected to a network. verifies any resource attached to another computer on a network that is different from the computer to which the user is logged on. connects multiple local area networks (lans) and wide area networks (wans).
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
question
Mathematics, 23.10.2019 03:00
Questions on the website: 13722359