Closed Jinchul81 closed 3 years ago
https://github.com/williamfiset/Algorithms/blob/9750d76d494090f49d0a80e4db2d3dcd33d05775/src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursiveOptimized.java#L186
I guess the update newParent.right.parent seems to be missing. I think we need the following line should be necessary. Am I wrong? If I am wrong, would you please explain the reason? Thanks. if (newParent.right) newParent.right.parent = node;
newParent.right.parent
if (newParent.right) newParent.right.parent = node;
I am sorry I thought Node contained its parent node. I confused with other materials. Let me close this issue.
Node
https://github.com/williamfiset/Algorithms/blob/9750d76d494090f49d0a80e4db2d3dcd33d05775/src/main/java/com/williamfiset/algorithms/datastructures/balancedtree/AVLTreeRecursiveOptimized.java#L186
I guess the update
newParent.right.parent
seems to be missing. I think we need the following line should be necessary. Am I wrong? If I am wrong, would you please explain the reason? Thanks.if (newParent.right) newParent.right.parent = node;