DOUBT REGARDING SORT STATEMENT

WHILE WRITING THE SORT STATEMENT BOTH FOR LEXICO ND NUMERICAL COMPARISON,
we write
sort(strpair,strpair +n,Lexicocompare);
But we re comparing the keys which is strpair.second
.So shouldnt it be
sort(strpair.second,strpair.second +n,Lexicocompare);???

HELLO @dhruv.mahajan.mait

logic for comparision is mentioned inside lexico compare function.

the first two params of sort function are for starting and ending address of container

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.