/datastructuresjs

Primary LanguageJavaScriptMIT LicenseMIT

JS Data structures

npm Build Status GitHub code size in bytes GitHub Release Date NPM

Package with some data structures implemented in JavaScript for academic purposes but it can be used for everyone that want

Available data structures

  • SimpleLinkedList
  • DoubleLinkedList
  • Stack
  • Queue
  • Graph

Installation

Install package executing these command:

    npm i @jesusgm/datastructurejs --save

Usage

const SimpleLinkedList = require('@jesusgm/datastructurejs').SingleLinkedList;

const ll = new SimpleLinkedList();

ll.appendHead(1);
ll.appendHead(2);
ll.appendHead(3);

console.log(ll.toString());

Returns

3 -> 2 -> 1 -> null

License

MIT