Skip to content

SK-CSE/datastructurejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

NPM package for data structure

Resources

Stars

Watchers

Forks

Packages

No packages published