Will not it be beneficial here if we will gonna make unordered_map<int,T> like because we have to then sort it too so sorting will be on basis of first.?

Will not it be beneficial here if we will gonna make unordered_map<int,T> like because we have to then sort it too so sorting will be on basis of first.?

what do you want to say?? why sort?
if you are saying about any other way just try it you will get to know whether it works or not @cbcao263

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.