js-stl icon indicating copy to clipboard operation
js-stl copied to clipboard

Data structures implemented in JS

trafficstars

Codacy Badge Build

js-stl

Classic and high performance data structures implemented in javascript.

  1. npm i
  2. npm run build // for production build
  3. npm run build:dev // for development build
  4. babel-node ./src/xx.js // run xx.js
  5. npm run build:es5 // for node server build
  6. npm test // run tests

Directory

  • Array

    • [x] CrossList
    • [x] TSMatrix
    • [x] algorithms
  • Binary Tree

    • [x] BinaryTree
    • [x] huffManCoding
    • [x] backtracking
  • Generalized List

    • [x] GList
  • Graph

    • [x] AdjacencyListGraph
    • [x] AdjacencyMatrixGraph
    • [x] AMLGraph
    • [x] OLGraph
  • List

    • [x] LinkedList
    • [x] LinearList
    • [x] DoubleLinkedList
    • [ ] StaticLinkedList
    • [x] LRUCache
    • [x] SkipList
  • Queue

    • [x] Queue
    • [x] CycleQueue
    • [x] PriorityQueue
  • Stack

    • [x] Stack
  • String

    • [x] HeapString
    • [x] LString
    • [x] SString
    • [x] algorithms
  • Search

    • [x] sequentialSearch
    • [x] binarySearch
    • [x] fibonacciSearch
    • [x] SecondOptimalSearchTree
    • [x] BinarySortedTree
    • [x] AVLTree
    • [x] RedBlackTree
    • [x] BTree
    • [x] B+Tree
    • [ ] DigitalSearchTree / DictionaryTree
      • [x] DoubleLinkedTree
      • [x] TrieTree
      • [ ] PatriciaTree todo
    • [x] SuffixTree
    • [x] HashTable
    • [ ] Treap todo
    • [ ] SplayTree todo
    • [ ] BitMap todo
    • [x] Bloom Filter
    • [x] ConsistentHash
  • Heap

    • [x] Heap
  • Sort

    • [x] insertion sort

      • [x] straightInsertSort
      • [x] binaryInsertSort
      • [x] path2InsertSort
      • [x] staticLinkedListInsertSort
      • [x] shellSort
    • [x] exchange sort

      • [x] bubbleSort
      • [x] bubbleSort2
      • [x] cockTailSort
      • [x] cockTailSort2
      • [x] quickSortRecursive
      • [x] quickSortRecursive2
      • [x] quickSortNonRecursive
      • [x] quickSort
      • [x] oddEvenSort
    • [x] selection sort

      • [x] simpleSelectionSort
      • [x] heapSort
    • [x] merge sort

      • [x] mergeSortRecursive
      • [x] mergeSortNonRecursive
      • [x] natureMergeSort
      • [x] naturalMergeSort
      • [x] linkedListNaturalMergeSort
    • [x] distribution sort

      • [x] countSort
      • [x] radixSort
      • [x] bucketSort