Longest Subarr with sum K


this code is referred from the associated video,
for the test case
6
3
2 1 -1 5 -2 3
i am expecting an op to be 4 as 1-1+5-2 = 3
but im getting op as 2
what am i missing here??

@akb.tech17 i think there is slight mistake in video i have updated your code at line 22 look at this code (https://ide.codingblocks.com/s/201913)

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.