You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var tree = new Tree(1);
var branch1 = tree.addChild(2);
var branch2 = tree.addChild(3);
var branch3 = tree.addChild(4);
branch1.addChild(5);
branch1.addChild(6);
branch3.addChild(7).addChild(8);
The correct order should be: [1, 2, 5, 6, 3, 4, 7, 8]
Instead it returns: [5, 6, 2, 3, 8, 7, 4, 1]
The text was updated successfully, but these errors were encountered:
Tree.js traverseDepthFirst doesn't return the correct order.
Based on the example dataset:
The correct order should be:
[1, 2, 5, 6, 3, 4, 7, 8]
Instead it returns:
[5, 6, 2, 3, 8, 7, 4, 1]
The text was updated successfully, but these errors were encountered: