removed unwanted check for childCount and added childCount property in trie Node

This commit is contained in:
Dhroov Gupta
2019-08-09 23:21:00 +05:30
parent b7a5af4788
commit 4e94cf04d2
2 changed files with 4 additions and 8 deletions

View File

@@ -15,6 +15,9 @@ function Node (options) {
// stores all direct folder descendants of this node
this.children = {};
// number of folders in the sub-trie of this node
this.childCount = options ? options.childCount : 0;
this.requests = []; // request will always be an array of objects
this.addChildren = function (child, value) {