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.
“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.
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?
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.
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.
9 years later: Still the best.
You explained in 6 minutes what my professor explained for 1.5 hours in my 2 hour class.
This video should be on the top of the search results. Clear, short, concise. Thanks, very helpful!
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
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.
One of the best video! You've covered all base scenarios and explained some advantages too! I love you, mate!
6 years later but found it really helpful
Thanks
This is the best explanation of binary search trees. Thanks! 🙏🏻
This is so damn good! The animation is very helpful!
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
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)
Best Video on bst so far
Really really good video! 🙏🏻
THE BEST vid on this topic
Very helpful! Thank you.
The explanation is top notchh!
Awesome explanation. Thank you.
Amazing explanation!
They seem useful.
thanks for the explanation
This was so helpful!
Really cool intro
Great video, 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. =)
very good explanation, thanks
at 4:57 did 25 use uno reverse card against 28.
Great job thanks sir
Thank you Joe
love the music
Thanks so much.
Thank you so much sir - from Harvard University!
Thank you
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.
Thank you.
epic outro
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 about {14. 6, 11, 32, 7, 23, 25, 13} the tree looks so weird
Great!
Sounds like George Lucas. Thanks for the help.
good one!
thank you!
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?
Beauty!
Nice
What's the usage for this?
Whenever you need very fast search access to data. For example, an index in SQL.
someone 💨💨 @2:30 🤣
That's how you know this video wasn't made by ChatGPT