Coding
Diameter of a Binary Tree
Find the diameter of a binary tree.
Input: root = [1,2]
Output: 1
Explanation: The longest path is simply the single edge connecting the root node to its only child.
Was asked at
Find the diameter of a binary tree.
Input: root = [1,2]
Output: 1
Explanation: The longest path is simply the single edge connecting the root node to its only child.
More interviews, more skills, more success.
Be the first to share your approach to this question