list类似于数据结构中的数组,索引很快,但是插入删除效率低(需要插入位置的前后元素移动来腾出位置或者补位)。 队列---FIFO,尾部进头出(bottom in ,top out) 栈-----LIFO,头部进头出(top in , top out)
deque就类似于栈了,在头部进行操作很快。
Sign in to make a reply
快乐互粉啦
list类似于数据结构中的数组,索引很快,但是插入删除效率低(需要插入位置的前后元素移动来腾出位置或者补位)。 队列---FIFO,尾部进头出(bottom in ,top out) 栈-----LIFO,头部进头出(top in , top out)
deque就类似于栈了,在头部进行操作很快。