1.0.2 • Published 4 years ago
stack-structure v1.0.2
stack-structure
A stack library
Usage
import Stack from "stack-structure";
const stack = new Stack();Methods
| Name | Params | Return value |
|---|---|---|
| top() | No params | any: element of top index |
| empty() | No params | boolean: check empty stack |
| push(x:any) | x: number | void: add x element to top stack |
| pop() | No params | void: remove top element of stack |