Home> Common Problem> body text

There are several different forms of binary trees

藏色散人
Release: 2020-07-02 09:23:35
Original
15698 people have browsed it

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.

There are several different forms of binary trees

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!