|
|
|
@ -77,7 +77,12 @@ const getLeaves = (node)=>{
|
|
|
|
if(threePathResult.length === 0){
|
|
|
|
if(threePathResult.length === 0){
|
|
|
|
return twoPathResult;
|
|
|
|
return twoPathResult;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
if(Number.isInteger(twoPathResult[0])){
|
|
|
|
return [twoPathResult, threePathResult]
|
|
|
|
return [twoPathResult, threePathResult]
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
twoPathResult.push(threePathResult)
|
|
|
|
|
|
|
|
return twoPathResult;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const leaves = getLeaves(tree);
|
|
|
|
const leaves = getLeaves(tree);
|
|
|
|
|