Remove parent parameter from binary tree node constructor to simplify syntax.

This commit is contained in:
Oleksii Trekhleb
2018-05-30 08:16:41 +03:00
parent fcc546347d
commit b7e27b2f07
4 changed files with 8 additions and 10 deletions

View File

@@ -188,7 +188,7 @@ describe('BinarySearchTreeNode', () => {
const obj2 = { key: 'obj2', value: 2, toString: () => 'obj2' };
const obj3 = { key: 'obj3', value: 3, toString: () => 'obj3' };
const bstNode = new BinarySearchTreeNode(obj2, null, nodeValueComparatorCallback);
const bstNode = new BinarySearchTreeNode(obj2, nodeValueComparatorCallback);
bstNode.insert(obj1);
expect(bstNode.toString()).toBe('obj1,obj2');