To store changed visited values from children of this node i . e . number of nodes visited by its children
let vis = 0 ; for ( let [ key , value ] of node . children . entries ( ) ) { vis += this . dfs ( value , depth + 1 ) ; }