loiane / javascript-datastructures-algorithms

:books: collection of JavaScript and TypeScript data structures and algorithms for education purposes. Source code bundle of JavaScript algorithms and data structures book
https://goo.gl/hrb00r
4.64k stars 1.24k forks source link

Made some suggestions #178

Closed hefeng6500 closed 2 years ago

hefeng6500 commented 3 years ago

Hi loiane

I am the Chinese reader of your book "Learning javascript data structure and algorithm". I am studying the AVL tree and found a line of code in the method of removeNode that is unnecessary,

link this

this.getBalanceFactor(node.left) === BalanceFactor.BALANCED

Because I think if the tree is balanced, there is no need to move

additionally,I submitted a request in the project , do you have permission to merge the code for me?

PR: https://github.com/PacktPublishing/Learning-JavaScript-Data-Structures-and-Algorithms-Third-Edition/pull/12

Looking forward to your response!

Jeffzholy commented 2 years ago

Hey @loiane , think this issue is fixed by this PR https://github.com/loiane/javascript-datastructures-algorithms/pull/193. And also @hefeng6500, your issue description is not related with the PR that you mentioned in the description? In a word this issue can be safely closed

loiane commented 2 years ago

@Jeffzholy thanks!