How To Install node-functional-red-black-tree on Kali Linux
Introduction
In this tutorial we learn how to install node-functional-red-black-tree on Kali Linux.
What is node-functional-red-black-tree
node-functional-red-black-tree is:
Functional-red-black-tree is a fully persistent red-black tree written 100% in JavaScript.
Functional (or fully persistent) data structures allow for non-destructive updates. So if you insert an element into the tree, it returns a new tree with the inserted element rather than destructively updating the existing tree in place. Doing this requires using extra memory, and if one were naive it could cost as much as reallocating the entire tree. Instead, this data structure saves some memory by recycling references to previously allocated subtrees. This requires using only O(log(n)) additional memory per update instead of a full O(n) copy.
Some advantages of this is that it is possible to apply insertions and removals to the tree while still iterating over previous versions of the tree. Functional and persistent data structures can also be useful in many geometric algorithms like point location within triangulations or ray queries, and can be used to analyze the history of executing various algorithms. This added power though comes at a cost, since it is generally a bit slower to use a functional data structure than an imperative version. However, if your application needs this behavior then you may consider using this module.
This package provides functional-red-black-tree for use with Node.js - an event-based server-side JavaScript engine.
There are three methods to install node-functional-red-black-tree on Kali Linux. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.
Install node-functional-red-black-tree Using apt-get
Update apt database with apt-get using the following command.
sudo apt-get updateAfter updating apt database, We can install node-functional-red-black-tree using apt-get by running the following command:
sudo apt-get -y install node-functional-red-black-treeInstall node-functional-red-black-tree Using apt
Update apt database with apt using the following command.
sudo apt updateAfter updating apt database, We can install node-functional-red-black-tree using apt by running the following command:
sudo apt -y install node-functional-red-black-treeInstall node-functional-red-black-tree Using aptitude
If you want to follow this method, you might need to install aptitude on Kali Linux first since aptitude is usually not installed by default on Kali Linux. Update apt database with aptitude using the following command.
sudo aptitude updateAfter updating apt database, We can install node-functional-red-black-tree using aptitude by running the following command:
sudo aptitude -y install node-functional-red-black-treeHow To Uninstall node-functional-red-black-tree on Kali Linux
To uninstall only the node-functional-red-black-tree package we can use the following command:
sudo apt-get remove node-functional-red-black-treeUninstall node-functional-red-black-tree And Its Dependencies
To uninstall node-functional-red-black-tree and its dependencies that are no longer needed by Kali Linux, we can use the command below:
sudo apt-get -y autoremove node-functional-red-black-treeRemove node-functional-red-black-tree Configurations and Data
To remove node-functional-red-black-tree configuration and data from Kali Linux we can use the following command:
sudo apt-get -y purge node-functional-red-black-treeRemove node-functional-red-black-tree configuration, data, and all of its dependencies
We can use the following command to remove node-functional-red-black-tree configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge node-functional-red-black-treeDependencies
node-functional-red-black-tree have the following dependencies:
References
Summary
In this tutorial we learn how to install node-functional-red-black-tree package on Kali Linux using different package management tools: apt, apt-get and aptitude.