Binary Search Trees (BST) Explained and Implemented in Java with Examples | Geekific
Вставка
- Опубліковано 28 лип 2024
- Support us on Patreon: / geekific
Discord Community: / discord
GitHub Repository: github.com/geekific-official/
Following our introductory trees video, and as promised, today, we delve in binary search trees. In this video we start by explaining what binary search trees are, then go ahead and detail each operation offered by this type of trees, and finally we implement these operations using Java.
Timestamps:
00:00 Introduction
00:22 What are Binary Search Trees?
04:11 Inserting to and Deleting Items from the Tree
06:27 Traversing a Binary Search Tree
07:56 The BST Implementation
09:34 Retrieve the Min and Max Elements
11:01 Implementing the Traverse Operation
12:46 Implementing the Insert Operation
17:22 Implementing the Delete Operation
19:47 Thanks for Watching!
If you found this video helpful, check other Geekific uploads:
- Graphs - The Fundamentals: • Introduction to Graphs...
- Introduction to Trees, Basic Tree Terminology and Different Types of Trees: • Introduction to Trees ...
- Generics and Wildcards in Java Made Simple: • Generics and Wildcards...
- Time and Space Complexity Simplified: • Introduction to Big-O ...
- Project Lombok Annotations Explained: • Project Lombok Annotat...
- SOLID Principles and Best Practices: • SOLID Design Principle...
- Recursion Made Simple, Recursive Methods: • What is Recursion? | R...
- Use-Case and Sequence Diagrams: • UML Use-Case and Seque...
- Generics and Wildcards in Java, Invariance vs Covariance vs Contravariance: • Generics and Wildcards...
#Geekific #BST #BinarySearchTrees
It took me some time to understand the deletion of the node that has two children. But finally understood after watching again and again. Thank you very much. You are doing a great job and I'm a big fan of your channel.
This is super great! It's truly fabolous how you compress all the heavy concepts in 20 minute video and still be as detailed and practical as a 3 hour university lecture. Pretty much respect keep it up🙏
Thanks a lot :) Really glad I could help!!
Thank you for your work! Great graphics and nice explanations.
You are more helpful than my college professors. I would rather pay my tuition to you!
Because of your way how you explain, you helped me to understand it very fast. Thank you
You are welcome! Glad it helped :)
Hey, Been watching your videos to understand basic data structures and algorithms. Just wanted to thank you for your expainations and using generics. You are a great help.
Glad to help! That's what the channel is here for :)
Saying again , its a underrated channel. while the videos like "A day in mang\fang" gets millions views , this gold content is not nowhere touching 10k views. Says a lot about people behaviour in general.
The implementation of deep recursion is awesome !!!
Glad you liked it :)
This is a great video! Thank you!
Glad you liked it!
Great video very helpful
super helpful
Thank you!
this video is sick you helped me so much thanks
So glad it was helpful! :)
Nice Video
What about removing with a parent pointer?
This is really useful, just have one question, the code you provided for inserting node will work if there is a duplicate value?
Glad it was! Nope since we have comparison for greater and smaller only :) Cheers!
In the delete implementation .. one child case .. how is the child is automatically assigned as a parent (in the return statement)?
Yes! It works similarly to what was explained between 15:00 and 17:20
Great for reducing the code by adding more methods. height (node) method has a condition if the node is null then it will return 0. My suggestion is return -1 instead of returning 0 then AVL balancing works perfectly. Any one Please let me if anything is wrong from my side.
Hello! Am not sure I got you, but feel free to check our AVL video here: ua-cam.com/video/Jj9Mit24CWk/v-deo.html :)
Mr. Takei?
🖖
where is main testing code...
Hey, I figured it was better to centralize everything in the same video :) Check it here: ua-cam.com/video/hmSFuM2Tglw/v-deo.html. Cheers!
I could not understand the part of deleting a node having two children nodes. Pronunciation of the words threw me off
Sorry about that! Feel free to ask any question and I'll try my best to clarify :)