Time Complexity for unordered_map{int,multiset{int}} and unordered_map{int,vector{int}}

Правка en1, от nine.nine, 2020-10-10 22:15:11

If I use unordered_map<int,multiset> to store the values, it gives a TLE. In the same code, if I change it to unordered_map<int,vector>, and sort the map's value when taken into use (to act like multiset), doesn't give a TLE. How/Where is the time complexity different for both ?

P.S. — Pardon me if I did not follow the conventions of a blog, this being the first one. Would be happy to know about my mistakes.

Теги unordered_map, multiset, vector

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский nine.nine 2020-10-10 22:15:11 729 Initial revision (published)