标签:
deque supports const time insert and erase operations at the beginning or the end, insert or erase in the middle take linear time.
vector在中间位置插入和删除操作时间复杂度为O(N);vector的push_back, pop_back操作时间复杂度为O(1), 头部插入和删除操作时间复杂度为O(N);deque的push_back, push_front, pop_back, pop_front操作时间复杂度为O(1);
标签:
原文地址:http://www.cnblogs.com/kkshaq/p/4598683.html