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

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 14:30
What percentage of companies is projected to use social media to locate new employees in 2012
Answers: 2
question
Computers and Technology, 24.06.2019 11:30
What does the https: // mean when you type in a website
Answers: 1
question
Computers and Technology, 24.06.2019 12:50
When is it most apprpriate for a development team to change the definition of done
Answers: 1
question
Computers and Technology, 24.06.2019 14:30
In a home that has 120 v service, there is an electric appliance that has a resistance of 12 ohms. how much power will this appliance consume? a. 10 w b. 120 w c 1200 w d. 1440 w
Answers: 1
You know the right answer?
)given the following algorithm (suppose n can only be even), answer the questions algorithm1(int n,...
Questions
question
Biology, 17.07.2019 16:30