Runtime for Search in Unordered_map C++ [closed]


I have come across lot of articles and questions suggesting that unordered_map is a lookup table that offers O(1) search time complexity. And I wonder how this is possible, And they say it is amortized to O(1) and worst case is O(n) for lookup. Now, even though after an extensive search I haven’t found when this lookup time hits O(n) and how actually unordered_map is implemented under the hood?