Binary tree and two-fork lookup tree-data structure and algorithm JavaScript description (10)

Source: Internet
Author: User
Binary tree and two fork search tree concept

A tree is a non-linear data structure that stores data in a hierarchical manner.

Trees are used to store hierarchical relational data, such as file system files;

The tree is also used to store a sequence table.

The topmost node of a tree is called the root node.

If more than one node is connected under a node, the node is called the parent node, and the node below it is called a child node.

A node can have 0, one, or more child nodes.

Nodes that do not have any child nodes are called leaf nodes.

Binary tree is a special kind of tree, its number of child nodes is no more than two.

Binary trees have some special computational properties, making some operations above them exceptionally efficient.

Accessing all nodes in a tree in a particular order is called a traversal of the tree.

The tree can be divided into several levels, the root node is the No. 0 layer, its child node is the 1th layer, the child node is the 2nd layer, and so on.

Finally, each node has a value associated with it, which is sometimes referred to as a key

Binary tree and two-fork search tree

Binary tree and two-fork lookup tree-data structure and algorithm JavaScript description (10)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.