subject

)given the following algorithm (suppose n can only be even), answer the questions algorithm1(int n, const int s[]) { if (n==2) return; for (int i = 1; i < =n/2; i++) cout< < s[ i ] * s[ i+n/2 ]; } a) what is the output of the algorithm if n = 6, and s[1, 3, 6, 2, 2, 2] b) what is the best case complexity of the algorithm? c) what is the worst case complexity of the algorithm?

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 10:00, QueenKy9576
Wich technology can a website use to allow you to listen to a concert live over the internet?
Answers: 3
image
Computers and Technology, 23.06.2019 02:00, kayladgranger
Which demographic challenge is europe currently experiencing? a. an aging and decreasing population b. a baby boomc. an unequal distribution between males and females d. a large group of teenagers moving through the school system(i chose a but i'm unsure)
Answers: 1
image
Computers and Technology, 23.06.2019 14:00, ava5015
What is html ? give a small description about html
Answers: 2
image
Computers and Technology, 23.06.2019 18:50, annieleblanc2004
Ais a picture icon that is a direct link to a file or folder
Answers: 1
You know the right answer?
)given the following algorithm (suppose n can only be even), answer the questions algorithm1(int n,...

Questions in other subjects: