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 02:20
The reset circuit used on the four 3-bit counters analyzed in this activity reset the counts to zero (000). it makes sense for the up-counters to start at zero (000), but the down-counters should start at seven (111). what would you need to change so that the 3-bit binary down counter with j/k flip-flops you just created would reset to seven (111)?
Answers: 1
question
Computers and Technology, 22.06.2019 21:00
The average cost of one year at a private college in 2012-2013 is $43,289. the average grant aid received by a student at a private college in 2012-2013 is $15,680.   what is the average student contribution for one year at a private college in 2012-2013?
Answers: 3
question
Computers and Technology, 23.06.2019 03:30
Ihave a singular monitor that is a tv for my computer. recently, i took apart my computer and put it back together. when i put in the hdmi cord and booted the computer to see if it worked, the computer turned on fine but the screen was blue with "hdmi no signal." i've tried everything that doesn't require buying spare parts, any answer is appreciated!
Answers: 1
question
Computers and Technology, 23.06.2019 08:30
All of these are true about using adhesive except: a. dissimilar materials can be joined. b. mixing tips are product and material specific. c. a specific application gun may be required. d. two-part adhesives are dispensed using two mixing tips
Answers: 3
You know the right answer?
)given the following algorithm (suppose n can only be even), answer the questions algorithm1(int n,...
Questions
question
Mathematics, 16.09.2019 11:00
question
Mathematics, 16.09.2019 11:00
Questions on the website: 13722363