subject

Assume n %2 ==0 and array A is previously declared and initialized properly with integer values. Also, array indexes range from 0 to n-1. I. A[0] to A[j], for every j in range [0, n/2-1]
II. A[n-j] contains the partial sum of A[n-1] to A[n-j], for every j in range [1, n/2]
III. res contains the sum of the original values of A[n/2-1] and A[n/2]
IV. res contains the sum of all numbers in A
V. The algorithm runs in O(n):

For j= 1 to n/2=1
A[j]= A[j] + A[j-1]
For j=2 n/2
A[n-j]= A[n-j] + A[n-j+1]
res= A[n/2 -1] + A[n/2]

a. III and V only
b. I, II, IV and V only
c. l, Il, IV only
d. l, Il, III only
e. l, II, III, V only

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 18:00
What ordering of tcp flags makes up the three-way handshake?
Answers: 2
question
Computers and Technology, 23.06.2019 16:50
15: 28read the summary of "an indian's view of indian affairs."15 betterin "an indian's view of indian affairs," it is asserted that conflicts could be reduced if white americansunderstood native americans..pswhich of the following would make this summary more complete? eleo the fact that chief joseph believes the great spirit sees everythinthe fact that chief joseph was born in oregon and is thirty-eight years oldo the fact that chief joseph states that he speaks from the hearthehehethe fact that chief joseph of the nez percé tribe made this claimebell- ==feetle===-felsefe ==submitmark this and retum.=
Answers: 3
question
Computers and Technology, 24.06.2019 02:00
Read the following scenario, and then answer the question below. you want to send an e-mail to your boss requesting a meeting to discuss a raise. what is the best example of an e-mail to an employer about this meeting? “hey jason. can we chat about getting me more money soon? let me know. peace, meg.” “hello jason. pardon me for sending yet another e-mail today about my need to talk to you about my position and a possible pay increase. i am dying to know when you can talk. sincerely, meg.” “hello jason. i have been with the company for one year and have taken on more responsibilities than outlined in my job description. i would appreciate an opportunity to speak with you about my position. let me know when we can schedule a meeting. you, meg.” “greetings jason! i hope this e-mail finds you well and happy today. i really, really want to talk to you about something important. i am not sure if you have time. i hope you do. get back in touch with me and let me know when we might talk. ever so much for taking the time to read this. sincerely, meg.”
Answers: 3
question
Computers and Technology, 24.06.2019 04:30
How do you share someone else’s tweet with your own twitter followers?
Answers: 1
You know the right answer?
Assume n %2 ==0 and array A is previously declared and initialized properly with integer values. Als...
Questions
question
English, 04.02.2020 08:43
question
Social Studies, 04.02.2020 08:43
Questions on the website: 13722360