Please explain how can we sort array of pairs or vector of pairs in c++ based second element of the pair.What should we pass in sort() and compare()
Sorting array of pairs or vector of pair in cpp
Refer this
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.
Link:https://ide.codingblocks.com/s/333872.Please correct this code.I made the ame code using top down approach,its printing some garbage value,lease correct it ans tell me my error