Question: what is the difference between map and hashmap in c++?
Answer: map uses a red-black tree as the data structure, so the elements you put in there are sorted, and insert/delete is O(log(n)). ... hashmap uses a hash, so elements are unsorted, insert/delete is O(1). Elements need to implement at least operator== and you need a hash function.