Question: what is the difference between unordered_map and vector?
Answer: It is important to note that vector elements are accessed by index while unordered_set elements are accessed by value. This leads to the operation with the greatest difference in time complexity between the two: find. A vector is just a list, and as such, find takes O(n).