Please read the new rule regarding the restriction on the use of AI tools. ×

STL set vs map time complexity

Revision en1, by katukutu, 2015-12-13 20:21:40

In general, both STL set and map has O(log(N)) complexity for insert, delete, search etc operations. But in some problems, set gives TLE, while map gets AC. Can someone please explain how map gives a better runtime than set? Thanks in advance :)

Tags stl

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English katukutu 2015-12-13 20:23:41 41
en1 English katukutu 2015-12-13 20:21:40 275 Initial revision (published)