What is the complexity for map.clear and unordered_map.clear

Правка en1, от Snow, 2022-05-14 16:03:37

I have been solving Stone Age Problem and something caught my attention, what is the real complexity for map.clear and unordered_map.clear

The same code using map.clear passes but unorder_map.clear however cppreference says both are linear, so what is the real complexity.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский Snow 2022-05-14 19:25:17 202
en1 Английский Snow 2022-05-14 16:03:37 570 Initial revision (published)