There is sth wrong in the below code
Hey @anmolaggarwal.432 only there is one mistake your code in bool cmp function don’t use equal to sign (return a.second<b.second;) rest your approach and code is correct.
Happy learning at Coding Blocks
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.