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