How is Hashmap in Java implemented internally? What are the pros and cons to use it? What are the complexities it provides for insert, delete and lookup? How are the C++ unordered_map and Java HashMap implemented to maintain O(1) average time complexity for most operations as the size of the hash table increases?