Adds an element to the stack.
(List<T> stack, T element)
| 46 | * Adds an element to the stack. |
| 47 | */ |
| 48 | public static <T> void push(List<T> stack, T element) { |
| 49 | stack.add(element); |
| 50 | } |
| 51 | |
| 52 | /** |
| 53 | * Removes an element from the stack. Asserts of the element is not the |