---
title: "Discussion on \"#543. Diameter of Binary Tree\" | Hashnode"
description: "Discussion on \"#543. Diameter of Binary Tree\". https://leetcode.com/problems/diameter-of-binary-tree/description/?envType=daily-question&envId=2024-02-27\n\nvar diameterOfBinaryTree = function(root) {\n    let res = 0\n\n    function DFS(node) {\n        if (! node) return 0\n\n        let left = DFS(nod..."
url: "https://hashnode.com/posts/543-diameter-of-binary-tree/65ddbaddd3d0f1b934287977"
---

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

Discussion

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

https://leetcode.com/problems/diameter-of-binary-tree/description/?envType=daily-question&envId=2024-02-27 var diameterOfBinaryTree = function(root) { let res = 0 function DFS(node) { if (! node) return 0 let left = DFS(nod...

Feb 27, 2024 · 1 min read · karleb.hashnode.dev  
Read the article

-   [#leetcode](https://hashnode.com/tag/leetcode)

## Written by

[Karleb](https://hashnode.com/@Karleb)

@Karleb · Nigeria

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

I am an enthusiastic web developer

I am a web developer who specializes on the PHP language with Laravel framework and currently developing love for nodejs. I love Javascript and all its frameworks. Tailwind is dope! 😎

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
