Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Not sure why this is happening...:
expected:<[??????]> but was:<[??????]>
Does not work for test case:
var leftBranch = new Node(1,undefined,new Node(2, undefined, new Node(3)));
var rightBranch = new Node(1,undefined,new Node(2, undefined, new Node(3,undefined, new Node(4))));
var newTree = new Node(0,leftBranch,rightBranch);
Test.expect(!allLeavesAtSameLevel(newTree),'Should return false for a tree with leaves at different levels');
This is wrong. Consider a root node with 3 consecutive left nodes, and 4 consecutive right nodes. At the root of recursion, isEqual will equal 0 and the function will return true.