Stack
Create a Stack.
Usage
src/sample/stack.ts
import { Stack } from 'athro';
let stack = new Stack();
Available Methods
Methods available for Stack.
| Methods | Description | Syntax |
|---|---|---|
| push | Add item to the stack | stack.push(value) |
| pop | Remove item from the stack | stack.pop() |
| top | Get the item from the top of the stack | stack.top() |
| isEmpty | Check if the stack is empty | stack.isEmpty() |
| getSize | Get size of the stack | stack.getSize() |