Consider a sequence of 14 elements: A = [−5, −10, 6, 3, −1, −2, 13, 4, −9, −1,…

PYQ GATE 2019

Consider a sequence of 14 elements: A = [−5, −10, 6, 3, −1, −2, 13, 4, −9, −1, 4, 12, −3, 0].

The subsequence sum S(i,j)=Σk=ijA[k]S(i,j) = \Sigma_{k=i}^j A[k] . Determine the maximum of 𝑆(𝑖, 𝑗), where 0 ≤ 𝑖 ≤ 𝑗 < 14. (Divide and conquer approach may be used.)

Answer: ________.

Attempted by 119 students.

Sign up free to check your answer

Sign up free

Explore the full course: Zero To Hero

Loading lesson…