Red-Black Trees

preview_player
Показать описание
An introduction to Red-Black trees. I discuss insertion but not deletion.

0:00 Introduction
0:36 Red-black tree: definition
2:40 black-height
4:51 The height of a red-black tree (proof)
8:18 Insertion: Overview
10:50 Rotations
13:02 Fixing the red-black property
17:58 Insertion: Example
20:56 Wrap-Up
Рекомендации по теме
Комментарии
Автор

This is the only tutorial that explained when to do recoloring or rotation in a clear and simple way.
I wish I could give 10x likes.
Thank You!

asarephilip
Автор

Many thanks for all the very informative videos. Your explanations are great, and have helped me learn a great deal. Thanks for your hard work!

AdamKuczynski
Автор

Very concise and clear, thank you very much Professor!

rean
Автор

Nice and enlightening video, thanks! If I'd dare some criticism, It could be more clear the reason for the rotation in case2. It seems almost like the criterium is whether it's the right or left child of the parent, but that depends again on which child the parent is of the grandparent. Anyway, it's the most informative video I found on the topic, so good job!

mrleenudler
Автор

Excellent explanation. And thank you for assuming knowledge of BSTs and such.

kabooby
Автор

Even though I dont understand some of the terms you use (its me on since Im not that good in DSA) but as a whole I like the way you explain things. Im currently studying DSA.

j-p-d-e-v
Автор

I wonder whether a all-black linear list could be seen as RBT.I understand that the corresponding operations guarantee that such trees can not be built.But, it's the definition that comes first. According to my search, as long as a BST that satisfies those 5 requirements should be called RBT. Like 1->2->3->4->NULL with all black color, the case at least to me does not violate any of those properties or I just missed something.

kevinxiong
Автор

But the resulting tree is not balanced, or is there something I might have missed?

mpho_moses
Автор

But wait, how did you fix the RB properties at 17:56, if #5 is violated? "For each node, all paths from the node to descendant leaves contain the same number of black nodes".

dmytrodieiev
Автор

Could you put this video on Odysee, please? It is excellent! Thanks you!

tsunamio