From 781d5224e0210081738be104e752cf7018f733c8 Mon Sep 17 00:00:00 2001 From: Oleksii Trekhleb Date: Sat, 14 Apr 2018 09:43:09 +0300 Subject: [PATCH] Add README. --- src/data-structures/tree/README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/data-structures/tree/README.md diff --git a/src/data-structures/tree/README.md b/src/data-structures/tree/README.md new file mode 100644 index 00000000..7fd4eb77 --- /dev/null +++ b/src/data-structures/tree/README.md @@ -0,0 +1,27 @@ +# Tree + +* [Binary Search Tree](https://github.com/trekhleb/javascript-algorithms/tree/master/src/data-structures/tree/binary-search-tree) +* [AVL Tree](https://github.com/trekhleb/javascript-algorithms/tree/master/src/data-structures/tree/avl-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](https://upload.wikimedia.org/wikipedia/commons/f/f7/Binary_tree.svg) + +## References + +[Wikipedia](https://en.wikipedia.org/wiki/Tree_(data_structure))