ds4js

1.0.2 • Public • Published

ds4js

NPM package for data structure

command to Install :

npm install ds4js --save

Data Structure:

  • Stack

Example:

const dataStructure = require('ds4js');
 
var stack = dataStructure.stack();
 
stack.push("hello");
var element = stack.peek(); // hello
var length = stack.length(); // 1
var isEmpty = stack.isEmpty(); // false
var element = stack.pop(); // hello
var length = stack.length(); // 0
var isEmpty = stack.isEmpty(); // true

Package Sidebar

Install

npm i ds4js

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

2 kB

Total Files

6

Last publish

Collaborators

  • saurabh_kumar