Skip to content

Commit

Permalink
修改 STL 容器表排版
Browse files Browse the repository at this point in the history
  • Loading branch information
huihut committed Oct 27, 2018
1 parent a1ff4e7 commit dae2872
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1238,18 +1238,18 @@ class doSomething(Flyable *obj) // 做些事情
[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)|无序|可重复|支持快速随机访问
[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)|无序|可重复|支持首尾快速增删,支持随机访问
[stack](https://github.com/huihut/interview/tree/master/STL#stack)|deque list 封闭头端开口|顶部插入、顶部删除 O(1)|无序|可重复|不用 vector 的原因应该是容量大小有限制,扩容耗时
[queue](https://github.com/huihut/interview/tree/master/STL#queue)|deque list 封闭底端出口和前端入口|尾部插入、头部删除 O(1)|无序|可重复|不用 vector 的原因应该是容量大小有限制,扩容耗时
[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)|无序|可重复|deque 或 list 封闭头端开口,不用 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处理规则
[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)|有序|可重复|
[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)|有序|可重复|
hash_set|hash表|插入、删除、查找 O(1) 最差 O(n)|无序|不可重复|
hash_multiset|hash表|插入、删除、查找 O(1) 最差 O(n)|无序|可重复|
hash_map|hash表|插入、删除、查找 O(1) 最差 O(n)|无序|不可重复|
hash_multimap|hash表|插入、删除、查找 O(1) 最差 O(n)|无序|可重复|
hash_set|哈希表|插入、删除、查找 O(1) 最差 O(n)|无序|不可重复|
hash_multiset|哈希表|插入、删除、查找 O(1) 最差 O(n)|无序|可重复|
hash_map|哈希表|插入、删除、查找 O(1) 最差 O(n)|无序|不可重复|
hash_multimap|哈希表|插入、删除、查找 O(1) 最差 O(n)|无序|可重复|

### 算法

Expand Down

0 comments on commit dae2872

Please sign in to comment.