varDLR=function(root){if(Object.keys(root).length ===0)return[];let res =[];
res.push(root.value);//6 5 4if(root.left) res = res.concat(DLR(root.left))if(root.right) res = res.concat(DLR(root.right))return res;}varLDR=function(root){if(Object.keys(root).length ===0)return[];let res =[];if(root.left) res = res.concat(LDR(root.left))
res.push(root.value)if(root.right) res = res.concat(LDR(root.right))return res;}varLRD=function(root){if(Object.keys(root).length ===0)return[];let res =[];if(root.left) res = res.concat(LRD(root.left));if(root.right) res = res.concat(LRD(root.right));
res.push(root.value)return res;}
console.log(DLR(tree),LDR(tree),LRD(tree));