Maps in C++

Правка en2, от Leone_kyoya, 2022-12-23 11:32:48

Using maps in C++ is common but dangerous also. As for the question Link if we use map, then it may leads to TLE, but the same CODE will work if you use a vector or any other method for storing the count of the given elements. This is because map is a self-balanced BST(Balanced Binary Search Tree). and it takes O(LOGN) time to insert and search element. So always be careful while using the map

Теги maps

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский Leone_kyoya 2022-12-23 11:32:48 2 Tiny change: 'then it map leads to ' -> 'then it may leads to '
en1 Английский Leone_kyoya 2022-12-23 11:32:09 461 Initial revision (published)