您的位置:首页 > 产品设计 > UI/UE

deque时间复杂度和vector,list比较

2015-06-24 21:20 686 查看
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);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: