Quiz Solution doubt

Please explain the C++ STL quiz-1 question no. 11.

The answer is 5 15.

hello @vritant2405

yeah answer will be that only , just checkout the comparator here we are giving priority to higher value (of second of pair) and if second value of pair is same then priority is given to smaller value (of first of pair).

so (5,15) and (7,15) have higher second value . and becuase 5 has lesser first value (5,15) is printed

Understood it. Thank you !

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.