There are eight different forms of binary trees, which are: 1. Empty binary tree; 2. Binary tree with only root node; 3. Binary tree with only root node and left subtree TL; 4. Only root node and right subtree Binary tree of subtree TR; 5. Binary tree with root node, left subtree TL and right subtree TR; 6. Skewed binary tree; 7. Full binary tree; 8. Perfect binary tree.
Tree
Tree is a very important and widely used nonlinear data Structure
Binary tree
Five basic forms: empty binary tree, binary tree with only root node, binary tree with only root node and left subtree TL, only root node and right subtree Binary tree of subtree TR, binary tree with root node, left subtree TL and right subtree TR
Other binary trees: skew binary tree, full binary tree, perfect binary tree
Implementation method: sequential storage, Chain storage
Operation set: Create binary tree, determine whether it is empty, traverse (pre-order traversal, in-order traversal, post-order traversal, level order traversal)
The above is the detailed content of There are several different forms of binary trees. For more information, please follow other related articles on the PHP Chinese website!