map与unordered_map
生活随笔
收集整理的這篇文章主要介紹了
map与unordered_map
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
時間復雜度:
| Ordering | increasing order | no??order |
| Implementation | Self balancing BST | Hash Table |
| search time | log(n) | O(1): 平均水ping O(n):最糟糕情況 |
| Insertion time | log(n) + Rebalance | Same sa search |
| Delete time | log(n) + Rebalance | Same sa search |
?
?
?
?
?
?
?
參考資料
1.?C++面試常見題目7_STL之map與unordered_map(紅黑樹VS哈希表)
2.?c++ STL容器map和unordered_map有什么區別
總結
以上是生活随笔為你收集整理的map与unordered_map的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: maven项目提交到git仓库时需要忽略
- 下一篇: 上海风云剧情介绍