How to use iterator for vector<int> &A?


Logic is fine, not sure how to use iterator.


simply use a for loop and you are good to go …


Thanks bro.
Could you please help me out with N max pair combinations, from Heaps and Maps ? I didn’t use extra memory, no recursion, every variable by reference.


ya sure. I ddn’t get your question. Do you want the code or is there something specific you want to ask?


Thanks man, but I got it resolved.