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.
UPD1: I have proved that isn't related with collision because I haven tested initiating a new one instead of cleaning and it passes. AC