mirror of
https://github.com/huihut/interview.git
synced 2024-03-22 13:10:48 +08:00
修改 STL 容器表排版
This commit is contained in:
parent
a1ff4e74c6
commit
dae2872069
14
README.md
14
README.md
|
@ -1238,18 +1238,18 @@ class doSomething(Flyable *obj) // 做些事情
|
||||||
[array](https://github.com/huihut/interview/tree/master/STL#array)|数组|随机读改 O(1)|无序|可重复|支持快速随机访问
|
[array](https://github.com/huihut/interview/tree/master/STL#array)|数组|随机读改 O(1)|无序|可重复|支持快速随机访问
|
||||||
[vector](https://github.com/huihut/interview/tree/master/STL#vector)|数组|随机读改、尾部插入、尾部删除 O(1)<br/>头部插入、头部删除 O(n)|无序|可重复|支持快速随机访问
|
[vector](https://github.com/huihut/interview/tree/master/STL#vector)|数组|随机读改、尾部插入、尾部删除 O(1)<br/>头部插入、头部删除 O(n)|无序|可重复|支持快速随机访问
|
||||||
[list](https://github.com/huihut/interview/tree/master/STL#list)|双向链表|插入、删除 O(1)<br/>随机读改 O(n)|无序|可重复|支持快速增删
|
[list](https://github.com/huihut/interview/tree/master/STL#list)|双向链表|插入、删除 O(1)<br/>随机读改 O(n)|无序|可重复|支持快速增删
|
||||||
[deque](https://github.com/huihut/interview/tree/master/STL#deque)|双端队列(一个中央控制器+多个缓冲区)|头尾插入、头尾删除 O(1)|无序|可重复|支持首尾快速增删,支持随机访问
|
[deque](https://github.com/huihut/interview/tree/master/STL#deque)|双端队列|头尾插入、头尾删除 O(1)|无序|可重复|一个中央控制器 + 多个缓冲区,支持首尾快速增删,支持随机访问
|
||||||
[stack](https://github.com/huihut/interview/tree/master/STL#stack)|deque 或 list 封闭头端开口|顶部插入、顶部删除 O(1)|无序|可重复|不用 vector 的原因应该是容量大小有限制,扩容耗时
|
[stack](https://github.com/huihut/interview/tree/master/STL#stack)|deque / list|顶部插入、顶部删除 O(1)|无序|可重复|deque 或 list 封闭头端开口,不用 vector 的原因应该是容量大小有限制,扩容耗时
|
||||||
[queue](https://github.com/huihut/interview/tree/master/STL#queue)|deque 或 list 封闭底端出口和前端入口|尾部插入、头部删除 O(1)|无序|可重复|不用 vector 的原因应该是容量大小有限制,扩容耗时
|
[queue](https://github.com/huihut/interview/tree/master/STL#queue)|deque / list|尾部插入、头部删除 O(1)|无序|可重复|deque 或 list 封闭头端开口,不用 vector 的原因应该是容量大小有限制,扩容耗时
|
||||||
[priority_queue](https://github.com/huihut/interview/tree/master/STL#priority_queue)|vector + max-heap|插入、删除 O(log<sub>2</sub>n)|有序|可重复|vector容器+heap处理规则
|
[priority_queue](https://github.com/huihut/interview/tree/master/STL#priority_queue)|vector + max-heap|插入、删除 O(log<sub>2</sub>n)|有序|可重复|vector容器+heap处理规则
|
||||||
[set](https://github.com/huihut/interview/tree/master/STL#set)|红黑树|插入、删除、查找 O(log<sub>2</sub>n)|有序|不可重复|
|
[set](https://github.com/huihut/interview/tree/master/STL#set)|红黑树|插入、删除、查找 O(log<sub>2</sub>n)|有序|不可重复|
|
||||||
[multiset](https://github.com/huihut/interview/tree/master/STL#multiset)|红黑树|插入、删除、查找 O(log<sub>2</sub>n)|有序|可重复|
|
[multiset](https://github.com/huihut/interview/tree/master/STL#multiset)|红黑树|插入、删除、查找 O(log<sub>2</sub>n)|有序|可重复|
|
||||||
[map](https://github.com/huihut/interview/tree/master/STL#map)|红黑树|插入、删除、查找 O(log<sub>2</sub>n)|有序|不可重复|
|
[map](https://github.com/huihut/interview/tree/master/STL#map)|红黑树|插入、删除、查找 O(log<sub>2</sub>n)|有序|不可重复|
|
||||||
[multimap](https://github.com/huihut/interview/tree/master/STL#multimap)|红黑树|插入、删除、查找 O(log<sub>2</sub>n)|有序|可重复|
|
[multimap](https://github.com/huihut/interview/tree/master/STL#multimap)|红黑树|插入、删除、查找 O(log<sub>2</sub>n)|有序|可重复|
|
||||||
hash_set|hash表|插入、删除、查找 O(1) 最差 O(n)|无序|不可重复|
|
hash_set|哈希表|插入、删除、查找 O(1) 最差 O(n)|无序|不可重复|
|
||||||
hash_multiset|hash表|插入、删除、查找 O(1) 最差 O(n)|无序|可重复|
|
hash_multiset|哈希表|插入、删除、查找 O(1) 最差 O(n)|无序|可重复|
|
||||||
hash_map|hash表|插入、删除、查找 O(1) 最差 O(n)|无序|不可重复|
|
hash_map|哈希表|插入、删除、查找 O(1) 最差 O(n)|无序|不可重复|
|
||||||
hash_multimap|hash表|插入、删除、查找 O(1) 最差 O(n)|无序|可重复|
|
hash_multimap|哈希表|插入、删除、查找 O(1) 最差 O(n)|无序|可重复|
|
||||||
|
|
||||||
### 算法
|
### 算法
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user