75: Diameter of a binary tree
Given a binary tree, return its diameter
Note:
diameterof a binary tree is thelengthof thelongest pathbetweenany two nodesin the tree
Example 1
Input: 1
/ \
5 3
Output: 2
Example 2
Input: 1
\
3
Output: 1