javascript-algorithms/src/data-structures/tree
2018-05-31 08:29:59 +03:00
..
__test__ Use Map for node meta data. 2018-05-31 07:59:20 +03:00
avl-tree Code style fixes. 2018-05-30 07:47:49 +03:00
binary-search-tree Return removed nodes in BST. 2018-05-31 08:29:59 +03:00
BinaryTreeNode.js Use Map for node meta data. 2018-05-31 07:59:20 +03:00
README.md Update READMEs. 2018-05-21 16:48:21 +03:00

Tree

In computer science, a tree is a widely used abstract data type (ADT) — or data structure implementing this ADT—that simulates a hierarchical tree structure, with a root value and subtrees of children with a parent node, represented as a set of linked nodes.

A tree data structure can be defined recursively (locally) as a collection of nodes (starting at a root node), where each node is a data structure consisting of a value, together with a list of references to nodes (the "children"), with the constraints that no reference is duplicated, and none points to the root.

A simple unordered tree; in this diagram, the node labeled 7 has two children, labeled 2 and 6, and one parent, labeled 2. The root node, at the top, has no parent.

Tree

References