Without passing comparator function how sort function work
Vector quiz Q No. 7
Hey @asif_h
Default comparator is less<int>()
And it sorts in ascending order
Incase its pair then w/o comparator it sorts according to first index with less<int>() as comparator
Sir if we have to sort second data of pair then that time we have to modify comparator.
And here you mention w/o comparator what is it?
Yes you have toh
W/o means without
Ok now my doubt is clear .thank you
1 Like
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.