class documentation
class LinkedDeque(_DoublyLinkedBase):
Double-ended queue implementation based on a doubly linked list.
Method | delete |
Remove and return the element from the front of the deque. |
Method | delete |
Remove and return the element from the back of the deque. |
Method | first |
Return (but do not remove) the element at the front of the deque. |
Method | insert |
Add an element to the front of the deque. |
Method | insert |
Add an element to the back of the deque. |
Method | last |
Return (but do not remove) the element at the back of the deque. |
Inherited from _DoublyLinkedBase
:
Method | __init__ |
Create an empty list. |
Method | __len__ |
Return the number of elements in the list. |
Method | is |
Return True if list is empty. |
Class | _ |
Lightweight, nonpublic class for storing a doubly linked node. |
Method | _delete |
Delete nonsentinel node from the list and return its element. |
Method | _insert |
Add element e between two existing nodes and return new node. |
Instance Variable | _header |
Undocumented |
Instance Variable | _size |
Undocumented |
Instance Variable | _trailer |
Undocumented |
Remove and return the element from the front of the deque.
Raise Empty exception if the deque is empty.
Remove and return the element from the back of the deque.
Raise Empty exception if the deque is empty.
Return (but do not remove) the element at the front of the deque.
Raise Empty exception if the deque is empty.