Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

lintcode

function countNodes(root) {  function dfs(node) {    if(node === null) return 0;    return dfs(node.left) + dfs(node.right) + 1;  }  dfs(root);}
Source by medium.com #
 
PREVIOUS NEXT
Tagged: #lintcode
ADD COMMENT
Topic
Name
7+6 =