1.0.1 • Published 4 years ago

data-structure-factory v1.0.1

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
4 years ago

Data structure factory

Node.js module that provides factory functions regarding common data structures.

const DataStructureFactory = require("data-structure-factory");

const stack = DataStructureFactory.createStack();

stack.push(5);
stack.push(10);
stack.push(15);

stack.print();

let sum = 0;
while (!stack.isEmpty()) {
    sum += stack.pop();
}
console.log("The sum of the stack is " + sum);
1.0.1

4 years ago

1.0.0

4 years ago