Open hefeng6500 opened 2 years ago
https://github.com/PacktPublishing/Learning-JavaScript-Data-Structures-and-Algorithms-Third-Edition/blob/520e02f041966400fa957bc1a3317b2dc9db4a96/LearningJavaScriptDataStructuresandAlgorithmsThirdEdition_Code/src/js/data-structures/avl-tree.js#L135
Dear loiane.
I think this line is unnecessary, when the node is balanced, it not need to be rotate. it will be cause error if rotate bananced node
Thanks for the comment, could you please raise a PR for the fix?
https://github.com/PacktPublishing/Learning-JavaScript-Data-Structures-and-Algorithms-Third-Edition/blob/520e02f041966400fa957bc1a3317b2dc9db4a96/LearningJavaScriptDataStructuresandAlgorithmsThirdEdition_Code/src/js/data-structures/avl-tree.js#L135
Dear loiane.
I think this line is unnecessary, when the node is balanced, it not need to be rotate. it will be cause error if rotate bananced node