2 queries regarding stl containers

why are we using unordered set and not set? Can map or unordered map store duplicate key value pairs?

hello @Senjuti256

amortised time complexity of unordered set is O(1) whereas for set is it is O(log(n)) ( for insertion ,deletion and find operation)

but in worst case ordered set performs better than unordered set .

we have multi set and multi map that allows duplicates

pls can you suggest me resources to study c++ STL pls

check this->

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.