Chapter 9 balanced binary sort tree (AVL) (manual analysis)

First look at two basic operations:

  1. L
  2. Right-handed

It can be shown as long as the node closest to the insertion junction of the imbalance is adjusted to the normal, all nodes on the path are balanced .

When manual analysis, summarized four imbalance as follows:

【example】

Keywords with a sequence as follows: ( 6 , 1 , 3 , 13 , 9 , 8 , 14 , 15 , 0 ) (6, 1, 3, 13, 9, 8, 14, 15, 0) , manually configured to sort a balanced binary tree.

Published 674 original articles · won praise 103 · views 110 000 +

Guess you like

Origin blog.csdn.net/qq_42815188/article/details/103961981