Trees data structure with types (uses cases included)
This articles breakdown the terminology used in trees data structure, as well as some types of trees and their use cases, to get familiar with them.

Search for a command to run...
This articles breakdown the terminology used in trees data structure, as well as some types of trees and their use cases, to get familiar with them.

No comments yet. Be the first to comment.
Physical vs Logical vs Abstract Data Types (DST) and data structure (DS) All computer science is about abstraction as everything is binary, and that's why its sometimes hard to learn, let's break down this terminology. Abstract data types Also known ...

This code shows how you can test the main function in Golang, using the official testing package. It compiles to an executable file, runs it, and makes sure there is no errors, its also used for other tests in the same main package. func TestMain(m *...

This is the recent list of target platforms, Go can work on out of the box

Go (Golang) the `make` function, to create slices, maps and channels

This articles breakdown the terminology used in trees data structure, as well as some types of trees and their use cases, to get familiar with them.
A tree is a collection of nodes, each node holds some data, one of the nodes is the root node, and other nodes. are disjoints subsets and each subset is a tree or a sub tree.
Each node has exactly one parent, and can have one or more children, no single node has more than one parent.
Trees are everywhere:
https://en.wikipedia.org/wiki/Tree_(graph_theory)
https://en.wikipedia.org/wiki/Tree_(data_structure)
Nodes is every unit of data
Its the connection between each two nodes, if we have N nodes we would have N-1 edges, because each node as parent, except the root node.
Is the upmost node, who has no parent, and have only children, for the children nodes this is their most parent node, generally in the top of the tree.
A node is a parent to its very next descendants. the descendants are the children to whom its connected with one single edge.
Are the children connected to the same node.
When we want to talk about children and their children, and the children of their children..etc we would say descendants.
It means the set of nodes we can reach from a particular node going to its children. so all the subtree.
From that node to the root node, all this nodes are considered anscestors.
Is the number of children a node has, so the direct children.
A degree of a tree cannot be told from a tree, but its predefined, we can say its a binary tree. but if its unbalanced, we would see it in a form of a linkedlist.
All nodes who has no children. so with nodes with degree 0
Levels starting from first level 1, the root, as we categorize each level by all the nodes who take the same number of edges to get to the root node.
Hight of nodes, is the same as the levels but it starts from 0, its very useful for analysis.
A collection of a tree is called a forest. which at least has a root node.
To convert a forest to a tree, we attach the roots of the present trees, to one single root.
There is many types of trees, and they are extremely useful and popular. for example
One of the most popular trees, is the binary tree,
Its tree of degree 2, means every node can have 0,1 or 2 children, but not more than 2.
$deg(T)=2$
$children={{0,1,2}}$
The binary search tree or BST , is a derivate of binary tree, but with a constraint in the data, Its a rooted binary tree, where every node (data) on the left side is grater than nodes on the right side.
$deg(T)=2$
Another tree named after inventors Adelson-Velsky and Landis, is a self balancing binary search tree.
Its one of the popular ones for classification and prediction.
A Fenwick tree or binary indexed tree is a data structure that can efficiently update elements and calculate prefix sums in a table of numbers.
Link to wiki
Or LSM tree one of the trees used in databases like influxDB.