[Data Structure] Basic Knowledge of Binary Tree

Total number of branches = number of summary points-1

Number of leaf nodes = number of double branch nodes + 1

Preface Traversal: Root left and right

Mid-order traversal: left root right

Post-order traversal: left and right root

Note: Knowing that pre-order and post-order cannot uniquely determine a binary tree

Binary sort tree definition:

1 ) If its left subtree is not empty, then the values ​​of all keywords on the left subtree are less than the value of the root keyword;

2) If its right subtree is not empty, then the right subtree The value of all the keywords in the tree is greater than the value of the root keyword;

3) The left and right subtrees are each a binary sort tree.

The definition of balanced binary tree:

Balanced binary tree, also known as AVL tree, is a special binary sort tree. The left and right subtrees are both balanced binary trees, and the absolute value of the difference between the height of the left and right subtrees does not exceed 1.

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 5023 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.