Advertisement
nikolayneykov92

Untitled

Jan 13th, 2020
355
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const maxDepth = function(node) {
  2.     return node ? Math.max(maxDepth(node.left), maxDepth(node.right)) + 1 : 0;
  3. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement