Correction in a binary search tree (non-balanced) you say O(h) = O(log n) but worst case for non-balanced is a tree that is only going in one direction: 1,2,3,4,5,6. The worst case run time here is O(h) = O(n). Just for anyone who might end up confused. In a RB tree we leverage that we constantly rebalance and therefore achieve O(log n)
Removing the root node or nulling it should de-reference the entire tree, effectively clearing it. This is useful if you want to have a clear method within your class.
2:30 quack! 12 becomes a child of 13, fine. But how come 12 doesn't become a sibling of 13? How can any other 2 children be siblings in the rest of the initial BT if not?
“On the order of 30 comparisons” doesn’t mean exactly 30. It means within a factor of 10. When discussing algorithms the exact number of operations usually doesn’t matter.
9 years later: Still the best.
That intro music was fire. I was really pumped up to learn about binary search trees.
no fr😂
it's like pregame music got me hyped up
Yeah I swear, was like gonna smack some leaves of them trees today.
Hahah, agreed.
Hey! before you do something important, you gotta set the mood right.
You explained in 6 minutes what my professor explained for 1.5 hours in my 2 hour class.
Thank you for not making it twenty minutes long.
Try two hours,lol
Eyy, 11 hour videos are all the rage now. Actually, anything north of 11hours has become the norm now.
This video should be on the top of the search results. Clear, short, concise. Thanks, very helpful!
One of the best video! You've covered all base scenarios and explained some advantages too! I love you, mate!
SO helpful! That last bit of music did scare me though
lol same, did not expect that
Programming should scare anyone more, lol
you learned about binary search tree. [Dramatic music plays] . Now you have the power to recreate google! xD
6 years later but found it really helpful
Thanks
This is the best explanation of binary search trees. Thanks! 🙏🏻
the SPEED animation was exactly what i needed as i'm remembering the entire algorithm course from 2 years ago in a couple of nights before the finals.
This is so damn good! The animation is very helpful!
Correction in a binary search tree (non-balanced) you say O(h) = O(log n) but worst case for non-balanced is a tree that is only going in one direction: 1,2,3,4,5,6.
The worst case run time here is O(h) = O(n).
Just for anyone who might end up confused. In a RB tree we leverage that we constantly rebalance and therefore achieve O(log n)
This explains it very well, thank you.
Had alot of trouble figuring out how they work since most pages out there have ill-defined terminology.
short, an simple. love it
Best Video on bst so far
Very helpful! Thank you.
THE BEST vid on this topic
They seem useful.
This was so helpful!
The explanation is top notchh!
Awesome explanation. Thank you.
Amazing explanation!
Great video, thanks
Thank you Joe
thanks for the explanation
love the music
very good explanation, thanks
you have badass entry , if you rise your voice while saying joe james will make it much better
+The Bombardi okay, I'll try that. =)
Great job thanks sir
Really cool intro
Thanks so much.
at 4:57 did 25 use uno reverse card against 28.
Thank you.
Thank you
Great!
epic outro
Thank you so much sir - from Harvard University!
good one!
thank you!
Beauty!
How did you come up with 30? Log(10,000,000) is not 30.
So, it's even faster.. wow
Shouldnt it be ln(10,000,000)/ln(2) = 23.25 => 24 comparisons?
There was one key thing missing. What happens if you remove the root node?
I believe you’ll still have an empty tree
I believe you’ll still have an empty tree
Removing the root node or nulling it should de-reference the entire tree, effectively clearing it. This is useful if you want to have a clear method within your class.
Find the next node in order. 19 would be the next node, so 19 is moved to the root.
Nice
Sounds like George Lucas. Thanks for the help.
what about {14. 6, 11, 32, 7, 23, 25, 13} the tree looks so weird
someone 💨💨 @2:30 🤣
That's how you know this video wasn't made by ChatGPT
2:30 quack!
12 becomes a child of 13, fine. But how come 12 doesn't become a sibling of 13? How can any other 2 children be siblings in the rest of the initial BT if not?
log(10 million) = 16.1, so how ya get 30?
“On the order of 30 comparisons” doesn’t mean exactly 30. It means within a factor of 10. When discussing algorithms the exact number of operations usually doesn’t matter.
What's the usage for this?
Whenever you need very fast search access to data. For example, an index in SQL.
Johnson James Miller Sarah Williams Ruth
Rodriguez Sarah Wilson Amy Walker Michael
Lopez Larry Rodriguez Amy Harris Amy