Diameter of Binary Tree | Tree Data Structure playlist C++ | Hello World | Hindi
Vložit
- čas přidán 30. 07. 2021
- This is the video under the series of DATA STRUCTURE & ALGORITHM in a TREE Playlist. We are going to understand the Diameter of the Binary Tree. We understand How to use the Height of the Binary for Finding the Diameter of the Binary Tree.
Join My Telegram channel for more Updates: telegram.me/helloworldbyprince
► 543. Diameter of Binary Tree
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.
Input: root = [1,2,3,4,5]
Output: 3
Explanation: 3 is the length of the path [4,2,1,3] or [5,2,1,3]
We also Provide courses on Competitive Programming and Data structure and Algorithms. Please see our Full Playlist on our Channel.
----------------------------------------------------------------------------------------:
Diameter of Binary Tree: leetcode.com/problems/diamete...
code in This Video: github.com/Prince-1501/Hello_...
----------------------------------------------------------------------------------------
► Unacademy
Use my code HELLOWORLD to get a 10% discount on this subscription
Course on Interesting Weekend Projects: unacademy.com/course/course-o...
----------------------------------------------------------------------------------------
*Follow me *
LinkedIn► / iamprince
Facebook► / helloworldofficials
Instagram► / helloworldbyprince
Twitter► / prince_king_
Telegram► telegram.me/helloworldbyprince
----------------------------------------------------------------------------------------
►Our Playlists on:-
► Tree: • Tree Data Structure & ...
► Hashing: • Hashing Data Structure...
► Matrix: • Matrix (Multidimension...
► STL: • Standard Template Libr...
► Leetcode: • LeetCode Solutions And...
►Competitive Programming: • Full course in Competi...
►C++ Full Course : • C++ full Course in HINDI
►Algorithms: • L-01 || Prefix Sum Arr...
►Data Structure: • Data Structures with C...
------------------------------------------------------------------------
🌟 Please leave a LIKE ❤️ and SUBSCRIBE for more AMAZING content! 🌟
✨ Tags ✨
Diameter of Binary Tree
The tree Data structure in Hindi
Right view of Binary Tree
Use of Tree Data structure in real Life
question asked in Google
off-campus placement
how to learn to code for beginners
Practice Tree data structure
tree in data structure
Best Telegram channel for Off-campus Placement drive
Tree in a data structure in Hindi
Tree Full playlist for Beginners
#Tree #Leetcode #programming
kya baat he … kya explanations tha🫡🫡. Very nice teaching skills👌👌👌
Long live Hello World !!! Bravo !!! I understood now. For past 2 days I was cursing myself that I am not able to write a naive solution.
Hahah ...aisa nahi hai bro sab samajh me aa jayega dhere dhere
Naive approach is so nicely explained.
Codingninja aur pepcoding mein bhi itna accha se nai smjh paaya tha
Yaha smjha 🤧❤️
Waoo, that's why Hello world 🙂 is there
Salute to your explanation bhaiya😃
Thanks a lot yaar, Please, share this channel in your college, groups, or LinkedIn bcoz it's cost nothing to you 😀
Bhaiya app explain bahut accha karte h good job now my all doubts are clear
Khatarnak Explanation tha bhaiya
Just got another reason to study trees.
This is best rxplanation of this question in the whole youtube till now
Thanks Rohit yaar please share this channel
wow great explanation prince bhai 🤩
Thanks a lot yaar
👌👌 Awesome video
Keep learning
very nice explanation
Thanks for liking
bro ur explaination is smooth !!
Thanks kushal
awesome sir thanks 🙂
Keep learning buddy ☺️
one of the best explanation
Glad it was helpful!
Best explanation!
Just share my channel with your friends and colleagues
very well explained ,small trick in algo improve the time compexity O(n) from O(n2)
yess😄
how ??
Jahar sir, heavy driver ho aap coding ki duniya me
Ekdum bhai ❤️
Thank you for wonderful explanation Prince bhai.
Just a thought :
diameter = Math.max(diameter, lh + rh);
counts the exact diameter. Then we don't need to count nodes and then do -1 in result.
Yes, you are right
Bhaiya, bahut achha feel aaya😀
Thank you so much
Keep learning buddy
great sir
Thanks a lot
bhai time complexity o(n) hogi na
Sir can you speak English
I will try buddy
Ok sir