avinash201199 / avinash201199/DSA-Questions
Diameter of Binary tree [JAVA]
Open
hacktoberfest
- Dominant language
- C++
- Stars
- 88
- Forks
- 167
- PR merge metrics
- No merged PRs in 30d
Description
**Problem Description**
To find diameter of the binary tree in O(n) time complexity. The diameter of a tree is the number of nodes on the longest path between two end nodes.
**Proposed Solution**
Maintaining a class variable to finding the height of each node rather than recursively finding it every time.
@avinash201199 can you please assign this issue to me.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.