Why map works fine but unordered_map throws TLE

Revision en1, by shivanshsingh9670, 2023-03-11 06:47:48

Question

In my both solutions, i am storing the frequencies of the values in maps and then pushing in priority queue. When I use unordered_map, it throws tle. But if I use map, it is accepted. Can someone explain Why ?

Unordered_map Solution — TLE

Map Solution — Acceppted

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English shivanshsingh9670 2023-03-11 06:47:48 517 Initial revision (published)