We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://github.com/benoitvallon/computer-science-in-javascript/blob/master/data-structures-in-javascript/tree.es6.js#L33
Splice in the for loop shifts the elements in the array and skips the sibling of the node that was removed.
Fix PR:
You can test with:
const tree = new Tree(); tree.add('ceo'); tree.add('cto1', 'ceo'); tree.add('cto2', 'ceo'); tree.add('cto3', 'ceo'); tree.add('dev1', 'cto1'); tree.add('dev2', 'cto1'); tree.add('dev3', 'cto1'); tree.add('dev2', 'dev3'); tree.add('dev1', 'cto2'); tree.add('dev2', 'cto2'); tree.add('dev3', 'cto2'); tree.add('dev1', 'cto3'); tree.add('dev2', 'cto3'); tree.add('dev3', 'cto3'); tree.printByLevel(); tree.remove('dev2'); tree.printByLevel();
The text was updated successfully, but these errors were encountered:
No branches or pull requests
https://github.com/benoitvallon/computer-science-in-javascript/blob/master/data-structures-in-javascript/tree.es6.js#L33
Splice in the for loop shifts the elements in the array and skips the sibling of the node that was removed.
Fix PR:
You can test with:
The text was updated successfully, but these errors were encountered: