@chaimnatan 1 possible situation (and probably the most frequent) is on the 2nd "Insertion" into a RB tree. Lets say you insert 5 as the first node into the RB tree. Now we have 1 node in our RB tree and (since it is the root) must be black. Then we insert 7 into the tree. Since 7 > 5, it must go on the right side. If we were to color this node black, the external nodes of 7 would have two black ancestors where as the external node of 5 (its left node) only has 1.Therefore the 7 node must be red
Many thanks - this helped immensely not only to implement a red-black tree, but to understand what was happening behind the deletion algorithm, and why it requires at most 3 rotations (although the particular case of 3 rotations, 2.1.1, when my red brother's right son has a red right son, isn't explicltly shown, but it's implied).
Overall, well explained and clearly shown in the slides. Thanks :)
Thanx for this very helpful lecture. I have a problem .. In the deletion part of the lecture it is mentioned that successor can't have a right child, i think it can't have a left child but can have right child. It is predecessor that can't have a right child.
i ahve an exam soon hahah and i don't was able to follow the course this course is cool thx :)
MsDawdawdaw 1 month ago
Damn I just love the intro music. So chill.
denebgarza 1 month ago
This has been flagged as spam show
I need to write an essay about these trees
so if anyone knows some good web pages where you can take materials from let me know :)
player1vladimir 11 months ago
Comment removed
player1vladimir 11 months ago
Comment removed
samujp1094 1 year ago
amazing
himanshu9408 1 year ago
What makes a node red? vs black?
chaimnatan 1 year ago
Comment removed
terrorzilla 1 year ago
@chaimnatan 1 possible situation (and probably the most frequent) is on the 2nd "Insertion" into a RB tree. Lets say you insert 5 as the first node into the RB tree. Now we have 1 node in our RB tree and (since it is the root) must be black. Then we insert 7 into the tree. Since 7 > 5, it must go on the right side. If we were to color this node black, the external nodes of 7 would have two black ancestors where as the external node of 5 (its left node) only has 1.Therefore the 7 node must be red
jonnism77 1 year ago 2
Many thanks - this helped immensely not only to implement a red-black tree, but to understand what was happening behind the deletion algorithm, and why it requires at most 3 rotations (although the particular case of 3 rotations, 2.1.1, when my red brother's right son has a red right son, isn't explicltly shown, but it's implied).
Overall, well explained and clearly shown in the slides. Thanks :)
FedericoLebron 2 years ago
better use the term "child" rather than son.. Otherwise a female marker might get pissed off...
Rafdaganga 2 years ago
Good presentation
mzundu 2 years ago
Thanx for this very helpful lecture. I have a problem .. In the deletion part of the lecture it is mentioned that successor can't have a right child, i think it can't have a left child but can have right child. It is predecessor that can't have a right child.
kpn4321 2 years ago
U r rite .... I haven't seen da whole lecture ... Bt wat u r saying is rite
TP
IITK
arpit10001 2 years ago