← All problemsSign in

Dean and Sam

Dean Winchester claims that he is very good with numbers and sequences. His jealous brother Sam decided to embarrass him by giving him a problem he can’t solve. Sam asked Dean to solve this : An array of numbers is given and he has to find the minimum sum possible by taking a subarray of the array. Precisely an array A of size N is given and he has to select two indices i and j such that the sum A

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start