1.0.0 • Published 7 months ago

@wfh/algorithms v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

Some useful algorithms or data structures that @whf/plink and @wfh/reactivizer use

  • Depth-first search (DFS) and Breadth-first search (BFS) graph

  • Extensible Red-black Tree, which supports additional element Ranking features:

    • dertermine order statistic for a dynamic set in O(lg n) time. and you may augment this tree structure by overriding left/right rotation function, fixup function.
  • Interval search tree, which support overlapping or duplicate boundary elements.

  • getMinAndMax() provides a function to find both minimum and maximum value from an iterable by only O(3n/2) times comparisons.