https://leetcode.com/problems/diamete...
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 path between two nodes is represented by the number of edges between them.
Watch video Diameter of Binary Tree - Leetcode online without registration, duration hours minute second in high quality. This video was added by user coding interview questions 07 January 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 57 once and liked it 4 people.