Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 18, 2024 via pnpm

functional-red-black-tree 1.0.1

A fully persistent balanced binary search tree
Package summary
Share
0
issues
1
license
1
MIT
Package created
2 Nov 2013
Version published
29 Sep 2014
Maintainers
1
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
functional-red-black-tree@1.0.1
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of functional-red-black-tree 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does functional-red-black-tree do?

The functional-red-black-tree npm package is a fully persistent red-black tree implementation written completely in JavaScript. This package works in both node.js and in the browser through browserify. Its functional data structure allows for non-destructive updates where inserting an element into the tree returns a new tree with the inserted element, instead of destructively updating the existing tree in place. The functional-red-black-tree aims to use memory optimally by recycling references to previously allocated subtrees. The package is particularly useful in applications that require this non-destructive update behavior despite the tradeoff of slower speed compared to an imperative version.

How do you use functional-red-black-tree?

Here's a simple step by step guide on how to install and use the functional-red-black-tree in your JavaScript project.

Step 1: Install the functional-red-black-tree package via npm:

npm install functional-red-black-tree

Step 2: You can use the functions of the package in your code as follows:

//Load the library
var createTree = require("functional-red-black-tree")

//Create a tree
var t1 = createTree()

//Insert some items into the tree
var t2 = t1.insert(1, "foo")
var t3 = t2.insert(2, "bar")

//Remove something
var t4 = t3.remove(1)

In the above example, a red-black tree is created and then updated with various insertions and deletions of items.

Where are the functional-red-black-tree docs?

The documentation for functional-red-black-tree is in the README file of the package hosted on GitHub. The link to the package is https://github.com/mikolalysenko/functional-red-black-tree.

The documentation covers installation and usage examples as well as an extensive API guide. This API guide comprehensively explains tree methods, node properties, and iterator methods. Each function in the documentation is explained along with its parameters, return values, and examples where necessary for a better understanding of its functioning.

All Versions