How does recursive functions keep count when searching for maximum depth of binary tree javascript

前端 未结 0 675
时光说笑
时光说笑 2021-01-19 02:25
 var maxDepth = function(root) {
     const recursion = (n) => {
         if (!n) return 0;
        
         let left = recursion(n.left)
         let right = re         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题