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