function height(root) { function dfs(node) { if(node === null) return 0; return Math.max(dfs(node.left), dfs(node.right)) + 1; } dfs(root);}
function countNodes(root) { function dfs(node) { if(node === null) return 0; return dfs(node.left) + dfs(node.right) + 1; } dfs(root);}
let arr = [1, 2, 3, 4, 5];for(let i = 0; i < arr.length; i++){ console.log(arr[i]);}