StacksQueues/Python/LinkedStack: Difference between revisions
From charlesreid1
(→Flags) |
No edit summary |
||
| Line 1: | Line 1: | ||
A linked stack is not complicated, in concept: we simply use a linked list to implement a stack. | |||
Because linked lists offer O(1) access to add or remove items from the front of the list, we can implement a linked stack with a minimal amount of wrapping of a linked list. | |||
See [[Linked Lists/Python]] for linked list implementation in Python, used to implement the LinkedStack. | See [[Linked Lists/Python]] for linked list implementation in Python, used to implement the LinkedStack. | ||
Latest revision as of 17:08, 9 September 2017
A linked stack is not complicated, in concept: we simply use a linked list to implement a stack.
Because linked lists offer O(1) access to add or remove items from the front of the list, we can implement a linked stack with a minimal amount of wrapping of a linked list.
See Linked Lists/Python for linked list implementation in Python, used to implement the LinkedStack.
Flags
| Stacks and Queues Part of Computer Science Notes
Series on Data Structures
Stacks and Queues: Python StacksQueues/Python · StacksQueues/Python/ArrayStack · StacksQueues/Python/ArrayQueue · StacksQueues/Python/ArrayDeque StacksQueues/Python/LinkedStack
Stacks and Queues: Java StacksQueues/Java · StacksQueues/Java/ArrayStack · StacksQueues/Java/ArrayQueue · StacksQueues/Java/ArrayQueueFS · StacksQueues/Java/ArrayDeque StacksQueues/Java/LinkedStack · StacksQueues/Java/LinkedQueue · StacksQueues/Java/LinkedDeque
Applications Postfix_Expressions#Stacks · StacksQueues/Subsets · StacksQueues/Subsets/Java
|