I loved this. The code was super easy to follow and the length of the video was perfect. Thank you for this, it helped me a lot with understanding the implementation.
@@geekific I wonder which is the proper practice of coding either to respond with a boolean in case of insertion and deletion or to use an approach like yours where we return the actual nodes here and there for ease of writing and readability. Even in the BST video, I've observed this and made my own approach to boolean response but coming to the AVL tree, writing to return booleans may make the code a little complex! please suggest to me...
hey man! I love the going over of code and demonstration. However, there's a problem. For an AVL tree, you do the rotations within the insertion method. So the tree strycture of 10, having 6, 4, 9 as left children and unbalanced would not even arise (since you'd be balancing/rotating with every insert). So as soon as with the insertion of the third element (4 or 6 or 10) you would have balanced the tree
I am actually working to make everything available on GitHub! However, it takes a bit of time to polish the code discussed in all of the videos and put it together, so I've been waiting for the channel to grow a bit to fully concentrate on this :) Anw, if any of the code discussed is not clear please feel free to ask in the comments :D
11:05 unfortunately you've got the AVL balance in wrong order. It is defined as: b = heightR - heightL; such that if R is higher, b>0 (just like the descending order!) See 11:20 That means your rotation names in the following code are inverted. Yes you could say "it's definition-dependent" but the common definition seems to be that b>0 is right-heavy, b
It is definition dependent xD There are many references out-there that use this approach and I personally think it is a matter of preference. I could include it in the next GitHub update in the source code but I don't think I'll upload another video just for this. Maybe in a future video where I expand on this topic I could mention it, why not! Thank you :)
I am actually working on it! However, it takes a bit of time to polish all the code and put it together, so I've been waiting for the channel to grow a bit to fully concentrate on this :) Anw, if you have any question or something is not clear, please let me know in the comments :D
Depends on the definition. At 2:40 we defined it as: "the number of edges from that node to the furthest null node", if you follow this definition then it will be 1. If you replace the word "null" with "leaf" then yeah it is going to be a 0. In this video we went with the first one to have a more straightforward implementation. Cheers!
Why not? :( That's its Google definition: 1- Engage in or discuss computer-related tasks obsessively, with great attention to technical detail. 2- Be or become extremely excited or enthusiastic about a subject.
I loved this. The code was super easy to follow and the length of the video was perfect. Thank you for this, it helped me a lot with understanding the implementation.
Thanks a lot! You really made my day :)
Excellent work - thank you for such a clear exposition.
My pleasure! Glad it was helpful :)
@@geekific
I wonder which is the proper practice of coding either to respond with a boolean in case of insertion and deletion or to use an approach like yours where we return the actual nodes here and there for ease of writing and readability. Even in the BST video, I've observed this and made my own approach to boolean response but coming to the AVL tree, writing to return booleans may make the code a little complex!
please suggest to me...
Can't be more helpful, love the code and the explanation!!!!
Loving your videos. Very informative & easy-to-follow!
Thank you so much! Glad you liked them :)
awesome man _/\_, skiplist and treaps next ?
The code was so clean and detailed with images thnx lot!
Glad it helped!
hey man! I love the going over of code and demonstration. However, there's a problem. For an AVL tree, you do the rotations within the insertion method. So the tree strycture of 10, having 6, 4, 9 as left children and unbalanced would not even arise (since you'd be balancing/rotating with every insert). So as soon as with the insertion of the third element (4 or 6 or 10) you would have balanced the tree
Well done man! The objective was to explain and relay the idea with an easy example!
no problem @@geekific
Amazing Content !!!
Glad you liked it :)
Great content, love the modular code! It'll be great if you can provide a link to the full code.
I am actually working to make everything available on GitHub! However, it takes a bit of time to polish the code discussed in all of the videos and put it together, so I've been waiting for the channel to grow a bit to fully concentrate on this :)
Anw, if any of the code discussed is not clear please feel free to ask in the comments :D
You are the best! Thank you so much for this video 😍 I finally understand AVL Trees 🤩
Thank you :) Happy to help!
Great video! It helped me a lot to better understand the AVL trees.
Glad it helped!
11:05 unfortunately you've got the AVL balance in wrong order. It is defined as: b = heightR - heightL; such that if R is higher, b>0 (just like the descending order!) See 11:20
That means your rotation names in the following code are inverted.
Yes you could say "it's definition-dependent" but the common definition seems to be that b>0 is right-heavy, b
It is definition dependent xD There are many references out-there that use this approach and I personally think it is a matter of preference. I could include it in the next GitHub update in the source code but I don't think I'll upload another video just for this. Maybe in a future video where I expand on this topic I could mention it, why not! Thank you :)
@@geekific Ok :D
I've watched more of your videos, great work! Thank you
Great video, thanks
Glad you liked it!
thanks a lot
Thank u so much
Glad you liked it :)
Do u provide the full code of the programs? That would be helpful
I am actually working on it! However, it takes a bit of time to polish all the code and put it together, so I've been waiting for the channel to grow a bit to fully concentrate on this :)
Anw, if you have any question or something is not clear, please let me know in the comments :D
What about budding from an array
We might explore that in a future video! Stay Tuned :)
the height of a leaf node is 0 tho, right?
Depends on the definition. At 2:40 we defined it as: "the number of edges from that node to the furthest null node", if you follow this definition then it will be 1. If you replace the word "null" with "leaf" then yeah it is going to be a 0. In this video we went with the first one to have a more straightforward implementation. Cheers!
Don't ever call me a geek
Why not? :( That's its Google definition:
1- Engage in or discuss computer-related tasks obsessively, with great attention to technical detail.
2- Be or become extremely excited or enthusiastic about a subject.
@@geekific lol I'm just goofing around. I appreciate your videos 👍🏾
Then what is a Nerd @@geekific ?