@bears-garden/stack

1.0.0 • Public • Published

@bears-garden/stack

classic stack implementation

Usage

var Stack = require("@bears-garden/stack"); var stack = new Stack();

push

runtime O(1)

stack.push(1);

pop

runtime O(1) @returns the last item pushed onto the stack

'let item = stack.pop()'

empty

runtime O(1) @returns true when the stack is empty

Readme

Keywords

Package Sidebar

Install

npm i @bears-garden/stack

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

4.28 kB

Total Files

6

Last publish

Collaborators

  • dragon_rider