Kindly help me understanding
CAnt understand initial constraints
Hey in the section you raised doubt, I can only see the editorial video. In that they are not talking about any constraints. Please raise the doubt in relevant section.
I would explain once what they are doing in the video, our aim is to find the longest subarray with sum 0. Now we take prefix sum of the array, and try to find if the we have current sum before or not, cause if we have encountered the same sum before it means that the sum of subarray in-between these two values is zero.
Eg suppose pref[i]=a, pref[j]=a, this means sum(a[i+1],…a[j])=0.
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.