Max Subarray of Drinks
CodeChefOpen on judge ↗
Anamika has gone to a bar and wants to drink as much as possible, but she can only drink a continuous subarray of the drinks available here! Given an Array $A[]$ , find $i,j$ such that the subarray $A[i]+A[i+1]...A[j]$ has the maximum sum of any subarray possible. Print this sum. It is possible that Anamika may not drink at all. ### Input - First line will contain $T$, number of testcases. Then t
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start