Make it possible to insert meta information to bst node.

This commit is contained in:
Oleksii Trekhleb
2018-05-31 07:16:35 +03:00
parent 33ac110cce
commit 02d7abcf65
4 changed files with 33 additions and 12 deletions

View File

@@ -5,7 +5,7 @@ export default class BinaryTreeNode {
* @param {*} [value] - node value.
* @param {Object} meta - any meta information that needs to be attached to the node.
*/
constructor(value = null, meta = {}) {
constructor(value = null, meta = null) {
this.left = null;
this.right = null;
this.parent = null;