datastructures-js
    TypeScript icon, indicating that this package has built-in type declarations

    10.1.1 • Public • Published

    build:? npm npm npm

    consolidates all data structures of @datastructures-js into a single repository.

    Contents

    install

    npm install --save datastructures-js

    require

    const {
      Stack,
    
      Queue,
    
      EnhancedSet,
    
      LinkedList,
      LinkedListNode,
      DoublyLinkedList,
      DoublyLinkedListNode,
    
      MinHeap,
      MaxHeap,
    
      MinPriorityQueue,
      MaxPriorityQueue,
    
      BinarySearchTree,
      BinarySearchTreeNode,
      AvlTree,
      AvlTreeNode,
    
      Trie,
      TrieNode,
    
      Graph,
      DirectedGraph,
    } = require('datastructures-js');

    import

    import {
      Stack,
    
      Queue,
    
      EnhancedSet,
    
      LinkedList,
      LinkedListNode,
      DoublyLinkedList,
      DoublyLinkedListNode,
    
      MinHeap,
      MaxHeap,
      HeapNode, // interface
    
      PriorityQueueOptions, // interface
      PriorityQueueItem, // interface
      MinPriorityQueue,
      MaxPriorityQueue,
    
      BinarySearchTree,
      BinarySearchTreeNode,
      AvlTree,
      AvlTreeNode,
    
      Trie,
      TrieNode,
    
      Graph,
      DirectedGraph,
    } from 'datastructures-js';

    extend

    Data structures are implemented here as ES6 classes (with types definitions) for general purposes. They can be extended for additional functionality and custom requirements.

    const { Graph } = require('datastructures-js'); // OR require('@datastructures-js/graph')
    
    class CustomGraph extends Graph {
      findShortestPath(pointA, pointB) {
        // code
      }
    }

    Build

    grunt build
    

    License

    The MIT License. Full License is here

    Install

    npm i datastructures-js

    DownloadsWeekly Downloads

    211

    Version

    10.1.1

    License

    MIT

    Unpacked Size

    11.5 kB

    Total Files

    8

    Last publish

    Collaborators

    • avatar