C++20 sections · 1024 units
Open in CourseQuiz: Map Choice
Knowledge check
Check Your Understanding
Which is faster for simple lookups: map or unordered_map?
- A.map is always faster
- B.They have identical performance
- C.map is O(1), unordered_map is O(log n)
- D.unordered_map is O(1) average, map is O(log n)