ds-algo-js

1.0.0 • Public • Published

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());

Package Sidebar

Install

npm i ds-algo-js

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

2.9 kB

Total Files

4

Last publish

Collaborators

  • hiteshmishra708