Effects of changing a node in a binary tree

Suppose I want to change orange nodein the next tree.

So, the only other change I will need to make is this left pointer green node.

blue node will remain the same.

alt text

Am I mistaken somewhere? Because according to this article (which explains lightning ), even the blue node needs to be changed.

Similarly, in this picture (repainted) of the same article , why do we change the orange nodes (when we change the node x)?

alt text

+3
source share
1 answer

, node. . node, node. node, node ( ). , node. , node , node ( node).

, , . node node , , .

, . node, , .

: , . , . , node, ( "" ). node, node, , node - , node. node.

+4

Source: https://habr.com/ru/post/1740501/


All Articles