Height of Binary Tree | Height of a Binary Tree | Binary Tree Data Structure | DSA-One Course #57
Вставка
- Опубліковано 8 лют 2025
- Hey guys, In this video, We're going to solve a problem called Find the height of a binary Tree. The height of a Binary Tree is defined as the longest distance from the root node to any leaf node.
📍Join my paid Java DSA course here: www.codingshut...
📍Spring Boot 0 to 100 course: www.codingshut...
📍React 0 to 100 course: www.codingshut...
🚀 Follow me on:
Instagram: / anuj.kumar.sharma
Linkedin: / sharma-kumar-anuj
X: x.com/sudoanuj
Hashtags:
#anujbhaiya #dsaone
Tags:
height of binary tree
height of a binary tree
height of tree
height of a tree
anuj bhaiya
maximum depth of binary tree
tree data structure
binary tree in data structure
binary tree
binary tree height
height of bst
height
height of trees
tree in data structure
tree data structure in java
anuj bhaiya java
binary tree java
trees in data structure
max depth of binary tree
height and depth of binary tree
tree dsa
depth of binary tree
diameter of binary tree
tree height
trees in dsa
trees data structures and algorithms
anuj bhaiya dsa
binary search tree in data structure
dsa
height of the binary tree
height of the tree
tree
tree in java
trees data structures
binary search tree
binary trees in data structures
height balanced tree
tree in dsa
tree traversal in data structure
trees
trees dsa
104. maximum depth of binary tree
anuj bhai
anuj kumar sharma
apna college
binary search tree java
binary tree in java
binary tree traversal in data structure
binary trees
bst
depth of a binary tree
diameter of a binary tree
dsa one
full binary tree
height and depth of tree
height of binary search tree
height using parent array
kunal kushwaha
You are a blessing to us. Never stop this series, please.
It's really commendable that after getting a well paid job at one of the dream company, Anuj Bhaiya has still given his efforts to continue working on this series and make other videos to help u. It's very easy to get those money and enjoy life, but to work this hard even after achieving great things, it is commendable.
height is -1 for empty node i think it should be written return -1 when root is NULL.
That's as per your problem statement.
by far the best explanation of this problem in whole youtube.
Anuj bhaiya u r love ,u have made many people's life,u r so self-less ,u r posting this world class stuff to us for free,u r not only hardworking u r selfless,u r my hero,u r such a beautiful soul who give students quality teaching for freee and here are in my college who are asking for money for everything whether its coding or internship .U r real hero !!!!!!!!!!!!!!!!!!!!!!!!!!!
bhiya litrally i am thankful to u for this playlist yaar! This is sooooo dammm good Thankyou for so much hardwork!The most humble youtuber i have ever seen in my life!
Thanks for being consistent, Really like your videos
THIS IS THE BEST VIDEO ON THE HEIGHT OF BINARY TREE
Nice getting boost day by day by seeing ur videos
excellent video bhaiya, call stack understood
I like your visual explanation better than any other youtuber. Please make more leetcode problem videos.
Made soo easy to understand recursive call in this height.
A very helpful video for understanding this concept. Thank you !!
great work bhai keep it up 🤩🤩
Thank you sir for your hardwork!!
You tube er best job h
Thank you and continue this series bhaiya
God bless you
Recursion me phas gya tha litreally, Thanks @Anuj Bhaiys
simply superb!
thank u for the video. recursive callstack explanation was very good.
after i listning recursion k deep me nhi jana hota hai upar upar se kr ke nikl jana hota hai >>>>> 3
very simple explanation
Thanks!! very important concept.....
it was very very good explanation
Thank you
Nice
❣❣
Video is very very helpful !!!!!!!!!!!!!!!!
Thanku bhaiya
Awesome☺☺☺🤯🤯
👉But sir single node ke lie to height 1 aa jayega jo ki galat hai , height 0 ana chahiye
Isme ek or condition hona chahiye.......
if(root->left ==nullptr && root->right==nullptr ){
return 0;
}
wonderful explanation
Bhaiya aapki video mujhe jaldi samaj aati hai
Thankyou ❤
Thank you
Thanks bhaiya
Interviewer can ask for recursive call stack. Interviewer not assure about the understanding interviewee without recursive call stack.
thank you bhaiya 🙏❤️
bhaiya, is there any algorithm to get the height of the tree without using recursion?
Sir as a fresher I can apply in which positions in companies, like can I apply for jobs for freshers as well as in support Engineer role.
Please 🙏 answer me.
Because very few jobs are coming for freshers so can I apply for those positions in which it's asking for 1/2 years of experience if I have 1/2 good internships.
Hum first!!
got it bhaiya also practiced it on gfg
Amazing❤
very greatful
This code returns height is 3. Which is correct?
thanks
Excuse me sir, what will be the height of the binary tree "if the root of the tree is 0" is mentioned?
Just change return 0 to return -1
how come there are two defination for height of tree?
Height and depth of only one node in tree is zero(0) not (1)
Both are correct as per different books
Because he started indexing from 1 not 0 in most languages we start from 0 but in general we can use either 1 or 0
good one
Hi Anuj bhaiya, I guess the height of tree should be 3 not 4 because the height is given by the sum no. of edges in the binary tree. Please correct me if I am wrong.
yes you are correct.
First ❤️❤️❤️
Height should be 3 no of edges from the root node...
1st Comment ❤️❤️. Bhaiya muje Refferal dilwa doo pls. Meine 500+ DSA q. Solve kiye h. Help me🙏🙏
Iteratiive bi bta dijiye
Sir I'm BCA graduate and reactJS ki job mil rahi hi 5 hajar salary hi should I do job Or MCA?
Bhai sirf 5 hazar ? Itna to tumhe ese hi koi pathology lab ke accounts department mein job se mil jayega . Infact atleast 12-15k to milenge hi . Lekin agar karna hi hai to experience ke liye karo 👍
#DSAONE
best
BHAIYA KYA PADATE HO YRR TUM MAJE AA GYE
Bhaiya aage ki video kB nikalo gay
Start 0 to n ?
👌👌🙏
very helpful
iski height 3nhi hogi kya?
3 hogi bhai
Bhai iss playlist ko jaldi khatam kro, waiting for Graph videos
height 3 hai
hi
Bhai
yo
amazing explanation
Thank you bhaiyya
Thank you bhaiya
thank you so much guru