i tried a problem of two sums but it is not giving any output.
can u point out the error?
Two sums problem- leetcode
Hi @mikkyimran
You are not getting any output because in the pairs function you have declared a map mp but have not stored any value in it and then when you are trying to access mp.find(target-V[i]) then it is coming out to be m.end() and that is why every time your else condition is running.
1 Like
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.