C++, LeetCode

Unordered Map

According to the documentation, the average searching complexity is O(1), by looking more into unordered_map.find()

It is redirected to lower_bound, passing in the original key value

For _Traits, it’s the template operators (open hashing I supposed), for the iterator defined within the _Traits class

   

LeetCode

1. Two Sum

 

 

LeetCode

7. Reverse Integer

Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 Note: The input is assumed to be a 32-bit signed integer. Your function should return 0 when the reversed integer overflows.