ts-datastr
TypeScript icon, indicating that this package has built-in type declarations

1.5.1 • Public • Published

DATA STRUCTURES Package based on JS data structures

Installation

npm i ts-datastr

Latest version

1.5.0

Cointains

  • Stack
  • Deque
  • Queue
  • Linked List
  • Doubly Linked List
  • Sorted Linked List

Examples

import { Deque, Queue, Stack }  from 'ts-datastr'

const stack = new Stack();
const queue = new Queue();
const deque = new Deque();

stack.push(1);
queue.enqueue('foo');
queue.enqueue(12);
deque.addBack(32);
deque.addFront('foo');
deque.addBack('another string');


console.log(stack.toString()); // 1
console.log(stack.isEmpty());  // false
console.log(queue.size());     // 2
console.log(queue.toString()); // foo, 12
console.log(deque.toString()); // foo, 32, another string

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i ts-datastr

    Weekly Downloads

    0

    Version

    1.5.1

    License

    MIT

    Unpacked Size

    32.3 kB

    Total Files

    22

    Last publish

    Collaborators

    • caparra92