Problems / Trees / Diameter of Binary Tree
#48 Easy Time O(n) Space O(n) Animated

Diameter of Binary Tree

Find the length of the diameter of a binary tree.

LeetCode ↗
Approach: DFS (Recursion)
Click play to start
Step 0 / 0
Press play to start the visualization.

Steps