two fork tree in computer science, a binary tree is a tree structure with a maximum of two subtrees per node. The subtree is often referred to as the left subtree and the right subtree (subtree). Binary trees are often used to implement a two-fork search tree and a two-fork heap. Each node of a binary tree has a maximum of two subtrees trees (no nodes with a degree greater than 2), and the subtree of the binary tree has left and right points, and the order cannot be reversed. The first layer of the binary tree has a maximum of 2^{i-1} nodes, and a two-tree with a depth of K has a maximum of 2^k-1 nodes; for any binary tree T, if its terminal node number is N_0, and the degree of 2 is n_2, then n_0=n_2+1. A depth of k, and there are 2^k-1 nodes called full two-tree, the depth of k, there are N nodes of two-tree, and only if each of its nodes with a depth of k in the full two-tree, the sequence number of 1 to n corresponds to a node, called a complete binary tree. Binary Tree classification: 1, full two fork Tree 2, complete binary tree 3, balanced binary tree two fork sorting tree two fork sort tree (binary sort trees) BST also known as Binary search tree (binary search trees) BST two fork sorting tree has the following properties: (1) Joz tree does not Empty, the value of all nodes on the left subtree is less than the value of its root node, (2) If the right subtree is not empty, the value of all nodes on the right subtree is greater
than the value of its root node, and (3) the left and right subtrees are also two-fork sort trees; (4)
There are no nodes with the same key value .
Two-fork Tree