Because teaching is not the main profession of your professor. Their real job is to do research but they teach on the side. You can expect them to understand the material very well; however, you can't expect them to know how to convey that information very well even though you are probable paying up the ### to take their course.
Extremely concise and clear! I was just asked how a self-balancing tree works and.. while I know how binary trees are built and function, I never learned about rotation and balancing.
A balanced binary tree, also referred to as a height-balanced binary tree, is defined as a binary tree in which the height of the left and right subtree of any node differ by no more than 1.
3:31 defines BST as n.left < n and n > n.right. Now go to example at 4:25. Let's assume A = 4, B = 3, D = 1, and E =2. If when we rotate we make E the left child of A we follow the definition as to A, but we now fail the definition as to B because E < B even though E is in the right subtree of B. That would mean that if we searched the tree for the value 2 we would start at the root B with value 3 and go to the left subtree which would not lead us to E thus we would lose our O(log n). I am struggling to reconcile this.
Considering the alphabetical order and the invariant as n.left < n and n < n.right; the BST shown in the videos does not satisfy the invariant condition. In the left tree we have N.left = B, n = A, and n.right = C. Now, B < A < C is not true. in the right tree: D < B < A < C is not true.
7:00 I think the code would be simpler by having methods that handle the double pointer update, i.e. methods `setLeft Child` and `setRightChild` which update the corresponding left/right pointer as well as the parent pointer, if any.
I have a question: How to insert a new node to an existing balanced binary search tree (not an AVL tree)? Do I insert the new node normally like how I would with a binary search tree and then apply rotations? Or do I insert it into an array first, sort the array and then rebuild the balanced binary search tree?
Thanks for the great explanations squeaky-voiced teen from Simpsons. Your explanations actually help a great deal and are more entertaining than my text books:)
What is a "logarithmic height"? What is a "linear height?" Would it not be better to say a height based on linear proportions? I do not like meaningless language which this seems to be an example of. Pease feel free to explain :-). Maybe I'm not "getting it"
My collage professor(he actually didn't deserve to br called a professor) did this topic it took him a whole hour long and in the what we got was lots of confusion
Why are free videos on the internet better than my college professors. Have a midterm on BST stuff tomorrow, this is a major help.
hello connor6woop
Because teaching is not the main profession of your professor. Their real job is to do research but they teach on the side. You can expect them to understand the material very well; however, you can't expect them to know how to convey that information very well even though you are probable paying up the ### to take their course.
Extremely concise and clear! I was just asked how a self-balancing tree works and.. while I know how binary trees are built and function, I never learned about rotation and balancing.
That's by far superior to what my prof forced out of himself. Thanks!
This is a top 5 educational video of all time
A balanced binary tree, also referred to as a height-balanced binary tree, is defined as a binary tree in which the height of the left and right subtree of any node differ by no more than 1.
3:31 defines BST as n.left < n and n > n.right. Now go to example at 4:25. Let's assume A = 4, B = 3, D = 1, and E =2. If when we rotate we make E the left child of A we follow the definition as to A, but we now fail the definition as to B because E < B even though E is in the right subtree of B. That would mean that if we searched the tree for the value 2 we would start at the root B with value 3 and go to the left subtree which would not lead us to E thus we would lose our O(log n). I am struggling to reconcile this.
I see now that if B = 3 then E has to be >= 3 so it could not = 2.
Thanks
Considering the alphabetical order and the invariant as n.left < n and n < n.right; the BST shown in the videos does not satisfy the invariant condition.
In the left tree we have N.left = B, n = A, and n.right = C. Now, B < A < C is not true. in the right tree: D < B < A < C is not true.
exactly i don't understand this. did you figure out what he is trying to say?
7:00 I think the code would be simpler by having methods that handle the double pointer update, i.e. methods `setLeft Child` and `setRightChild` which update the corresponding left/right pointer as well as the parent pointer, if any.
Great video!
3:13 I think it would have been best to label the nodes such that the inorder traversal is
A, B, C, D, E
3:31 does E have to necessarily be less than A? What if it is more?
Great video man, exactly what I needed! Helped me a ton :)
Dude... Ur Amazing visuals making damn easy... How come I found this late... I Bookedmarked urs... Awesome explanations..
Thanks for making man! Super helpful.
I have a question: How to insert a new node to an existing balanced binary search tree (not an AVL tree)? Do I insert the new node normally like how I would with a binary search tree and then apply rotations? Or do I insert it into an array first, sort the array and then rebuild the balanced binary search tree?
Absolutely incredible. Thank you very much for your videos!
To the point and clear explanation :) please note, the AVL tree intro: might not be the correct link. Thanks
Thanks for the great explanations squeaky-voiced teen from Simpsons.
Your explanations actually help a great deal and are more entertaining than my text books:)
top 20 university and this video explained something i didnt understand for an hour in lecture in 8 mins
What is a "logarithmic height"?
What is a "linear height?"
Would it not be better to say a height based on linear proportions?
I do not like meaningless language which this seems to be an example of. Pease feel free to explain :-). Maybe I'm not "getting it"
Two trees at 3:10 are a bit confusing! It would better if numbers were used instead of letters.
Amazing video man love it
Preparing to my amazon interview with your videos. Thanks!
What is the difference between remove and delete?
Thank you for this very helpful video!
great explanation
a very good explanation, thank you 👏
Thanks man really helped out.
Can some one tell me how is D < B? and how is A > C?
This is pure torture... :P Thanks though.. Got an exam tomorrow and this helped..
Blanced Binary Search trees are cool
Thanks a lot from Brazil!
damn.. that's beautiful!!!!!!!!! Thank you so much!!!
This is AMAZIN !
Way better than the crap served in MIT Open Courseware
Computer Scientists: "Let me introduce you to the secret high-art of informatics, young Padawan!"
me: "Haha jQuery go brrrrrrrrt!"
My collage professor(he actually didn't deserve to br called a professor) did this topic it took him a whole hour long and in the what we got was lots of confusion
u saved me
Your website has an error !!! 503 Error .
the goat
The DSW algorithm works well for balancing like this.
I still don't understand lol
u seem too surprised by elementary things. It's a bit annoying and distracting.
Anyways, ok video. Helped me learn so thanks.
kkkkkkkkaren