---
title: "Discussion on \"Diameter of Binary Tree\" | Hashnode"
description: "Discussion on \"Diameter of Binary Tree\". Problem\nGiven the root of a binary tree, return the length of the diameter of the tree.\nThe diameter of a binary tree is the length of the longest path between any two nodes in a tree. This path may or may not pass through the root.\nThe length of a p..."
url: "https://hashnode.com/posts/diameter-of-binary-tree/671dc4fc8b6b3efc64cbb928"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Diameter of Binary Tree](https://chetan77.hashnode.dev/diameter-of-binary-tree?utm_source=hashnode&utm_medium=feed)

Problem Given the root of a binary tree, return the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path between any two nodes in a tree. This path may or may not pass through the root. The length of a p...

Oct 27, 2024 · 2 min read · chetan77.hashnode.dev  
Read the article

-   [#diameter-of-binary-tree](https://hashnode.com/tag/diameter-of-binary-tree)
-   [#tree](https://hashnode.com/tag/tree)
-   [#binarytrees](https://hashnode.com/tag/binarytrees)
-   [#height-of-a-binary-tree](https://hashnode.com/tag/height-of-a-binary-tree)
-   [#depth-first-search](https://hashnode.com/tag/depth-first-search)
-   [#dfs](https://hashnode.com/tag/dfs)
-   [#dsa](https://hashnode.com/tag/dsa)

## Written by

[Chetan Datta](https://hashnode.com/@chetan77)

@chetan77 · Hyderabad, India

  
[View profile](https://hashnode.com/@chetan77)

Software Engineer

I share my learnings here. Thanks for reading.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
