Balanced binary search tree rotations

preview_player
Показать описание
Learn about balanced binary search tree rotations

===========================

Related videos:

AVL tree source code:
Рекомендации по теме
Комментарии
Автор

Why are free videos on the internet better than my college professors. Have a midterm on BST stuff tomorrow, this is a major help.

qazaqwert
Автор

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.

isunktheship
Автор

That's by far superior to what my prof forced out of himself. Thanks!

Art-fnns
Автор

Great video man, exactly what I needed! Helped me a ton :)

kaloyankraynin
Автор

Absolutely incredible. Thank you very much for your videos!

randyn
Автор

This is a top 5 educational video of all time

Jason________
Автор

Dude... Ur Amazing visuals making damn easy... How come I found this late... I Bookedmarked urs... Awesome explanations..

pudisasikar
Автор

Thank you for this very helpful video!

jodoinscott
Автор

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.

ejiwlww
Автор

damn.. that's Thank you so much!!!

alvinc
Автор

To the point and clear explanation :) please note, the AVL tree intro: might not be the correct link. Thanks

rashmikulkarni
Автор

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

joseville
Автор

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.

joseville
Автор

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:)

deineoma
Автор

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?

quachhengtony
Автор

Preparing to my amazon interview with your videos. Thanks!

kazakhification
Автор

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.

learn
Автор

top 20 university and this video explained something i didnt understand for an hour in lecture in 8 mins

stupit
Автор

This is pure torture... :P Thanks though.. Got an exam tomorrow and this helped..

sandessharma
Автор

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.

MSneberger