Code challenge
Maximum Depth of Binary Tree
Problem
Given the root of a binary tree (`{ val, left, right }`), return its maximum depth (number of nodes along the longest root-to-leaf path).Editor · javascript4 lines · 48 chars
Code challenge
Problem
Given the root of a binary tree (`{ val, left, right }`), return its maximum depth (number of nodes along the longest root-to-leaf path).