I did’nt get :
s.find(pre)!=s.end()
in the line :
if(pre==0 or s.find(pre)!=s.end())
Hashing:check subarray with sum zero
Hello @anika203a this is the hashing condition in which you see in the set whether the value which is present in the set or not.
this means if the particular value in the set is found in somewhere between the it will give true otherwise it will give false.
if you have any other doubt you can ask here:
Happy Learning!!
Okay so pre can be the cumulative sum at any point in the set and if there is another same cumulative sum returned by find () then it will give true…is it?
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.