stack-queue-ts
v0.0.3
Published
Implementation of Stack and Queue in Typescript.
Downloads
1
Readme
Collections
Typescript implementation of
- Stack
import { Stack } from 'stack-queue-ts';
let stack = new Queue<number>();
stack.push(20);
stack.push(10);
let num = stack.pop(); //10
- Queue
import { Queue } from 'stack-queue-ts';
let queue = new Queue<number>();
queue.enqueue(20);
queue.enqueue(10);
let num = queue.dequeue(); //20