CMSC420-0201: Lecture - Shared screen with speaker view
how did you get such good handwriting?
if balance(v) < 0, then is right heavy or left heavy?
are c', c'' ever of the same height?
the the double rotation case
so updateHeight(p) should happen even if the tree doesn't need to be rebalanced?
why is it only checking balance factor < -1 and not > 1?
that would be in the else(symmetrical) case
Why is there no need for rotateLeft or rotateLeftRIght cases?
should there be an else case where you do nothing?
So you check if RR is greater than LR?
In the else
My bad, I took “symmetrical” to mean the tree is balanced
OKay thank you
isn't it +1/0 on B
and -1/0 on D
so if the deleted node wasn't from E, we wouldn't need to rotate?
In the pseudocode where are you updating the heights during insert()?
Do we say a null subtree has a balance factor of -1?
I think a null node doesn't have a balance factor, but it has a height of -1
why is both 4 and 9 have -1/0, but 4 has height +1 but 9 has -2?
why wouldn't you perform the rotation on "6"?
I think you perform rotation on the 9 because that's where the balance factor first gets to +2 or -2
why does 9 have -2 then since the right is 0 and left is -1? 0 - (-1) = + 1?
ohhh I got it
balance is the difference between the heights
sorry I was mistaken the factor as height
not the differecnce between the balance factor
why the node 3 has balance factor +1? isn’t it +2?
the original tree is not avl
are you going to post this updated "slide" into the course webpage?
when are we recomputing heights in the functions/methods?