class documentation
class LinkedStack:
LIFO Stack implementation using a singly linked list for storage.
| Method | __init__ |
Create an empty stack. |
| Method | __len__ |
Return the number of elements in the stack. |
| Method | is |
Return True if the stack is empty. |
| Method | pop |
Remove and return the element from the top of the stack (i.e., LIFO). |
| Method | push |
Add element e to the top of the stack. |
| Method | top |
Return (but do not remove) the element at the top of the stack. |
| Class | _ |
Lightweight, nonpublic class for storing a singly linked node. |
| Instance Variable | _head |
Undocumented |
| Instance Variable | _size |
Undocumented |