GATE CS 2019 · Asymptotic Analysis & Recurrences

NAT · 1 mark · Problem PROG-DIVC-0088

Consider a sequence of 14 elements: A = [-5, -10, 6, 3, -1, -2, 13, 4, -9, -1, 4, 12, -3, 0]. The sequence sum \(S(i,j)=\sum_{k=i}^{j}A[k]\). Determine the maximum of S(i,j), where \(0 \leq i \leq j \lt 14\). (Divide and conquer approach may be used). Answer:

Numerical answer (NAT).

Solve it on GATE DA practice →More Searching & Sorting Algorithms problems

Show the worked solutionOfficial GATE Answer Key: [29.0, 29.0].See full step-by-step discussion on GateOverflow: https://gateoverflow.in/302823/gate2019-cs-25

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com