Data structure--two forks find (sort) tree

Source: Internet
Author: User
Binary sort tree also known as binary search tree, it can be an empty tree, if not empty, has the following properties:
  • The left subtree of the Joghen node is not empty, then all the nodes on the left subtree are less than the key value of the root node;
  • The right subtree of the Joghen node is non-empty, and all the nodes on the right subtree are of the key value greater than or equal to the root node;
  • The left and right sub-trees of the root node are also the binary sort tree;
What are precursors and successors:
  • The precursor of a node: the largest node in the left subtree of the node;
  • The successor of the node is the smallest node in the right sub-tree of the nodal point;

That is, in the middle sequence traversal, the node before and after the junction is the predecessor of the node and the successor of the nodal point.

Other look at this wonderful blog post, no longer make the wheel again.

Data structure--two forks find (sort) tree

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.