for(int i = 0; i < A.size(); i++){
if(mp.find(A[i]) == mp.end()){
if(mp.find(B-A[i]) == mp.end())
mp[B-A[i]] = i;
}
Why are these three lines of code used here? explain in detail please
Join Stack Overflow to learn, share knowledge, and build your career.
for(int i = 0; i < A.size(); i++){
if(mp.find(A[i]) == mp.end()){
if(mp.find(B-A[i]) == mp.end())
mp[B-A[i]] = i;
}
Why are these three lines of code used here? explain in detail please