Lookup time in unordered_map > map in C++?

Revision en1, by sajalhsn13, 2018-07-25 11:07:06

Hello Everyone,

It was known to me that lookup time in unordered_map is faster than map in C++. When I have to lookup frequent than insertion I should use unordered_map. In this problem I used unordered_map because in my implementation lookup is more frequent than insertion. But I got TLE. In my implementation with map I got accepted. what is wrong here? Any explanation will be helpful.

Thank you.


  Rev. Lang. By When Δ Comment
en1 English sajalhsn13 2018-07-25 11:07:06 651 Initial revision (published)