Data Structures and Algorithms in JavaScript
Usage
const { Stack, Queue } = require('ds-algo-js')
Stack
const stack = new Stack()
// const stack = new Stack(false)
// use false if don't need console logs
stack.push(4)
stack.push(5)
stack.push(6)
console.log(stack.pop());
Queue
const queue = new Queue()
// const queue = new Queue(false)
// use false if don't need console logs
queue.push(4)
queue.push(5)
queue.push(6)
console.log(queue.pop());