MAP AND UNORDERED_MAP STL

Bhaiya , map or unordered map stl mai bs output ka hi difference hai na ki map mai jo output hai vo sorted order mai hai lekin unordered mai koi sorted order nahi hai?

hello @CODER_JATIN

nahi aur bhi difference hai.

map ki implementation me self balancing bst use karte hai jabki unordered map pe hastable use hota hai.

map me saare operation hamesha o(log(n)) hota hai
jabki unordered map me O(1) amortiesed aur O(N) worst case me hota hai

Okay bhaiya , matlab bst wali implementation hai map mai?

ha . . . . . . . . . . . . .

OKAY BHAIYA 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.