dangraph / Exports / utils/danStack / Stackable
utils/danStack.Stackable
A Stackable interface is composed of: push -> insert a value to the top of the stack pop -> get the value from the top of the stack and remove it from the stack itself peek -> get the value from the top of the stack but do not remove it from the stack itself isEmpty -> check if the stack is empty clear -> clear all stack's elements
| Name |
|---|
T |
▸ clear(): void
void
▸ isEmpty(): boolean
boolean
▸ peek(): undefined | T
undefined | T
▸ pop(): undefined | T
undefined | T
▸ push(val): void
| Name | Type |
|---|---|
val |
T |
void