B-trees in 6 minutes — Deletions

preview_player
Показать описание
Step by step instructions for deleting a key from a B-tree.

Sources:

Рекомендации по теме
Комментарии
Автор

Don't get discouraged. Please keep uploading these!

flower
Автор

Your B tree and red black tree video I think are the best that I can find on YouTube. Please keep uploading these video. I like your teaching a lot.

MT-oosx
Автор

I watched your whole playlist for B-Trees. They are very helpful. Good job Michael! Wish me good luck for my data management exam on tomorrrow :)

murathankayhan
Автор

in the case 3b can't we just directly delete 17 as it won't break any of the properties of b tree??

amanbisht
Автор

Excellent vids on b trees, you've come in clutch for pretty much my entire CS degree now haha, from first year all the way to my final now. Appreciate it a tonne. Just one important thing about this algorithm to note to most people reading (I believe it wasn't mentioned in the video but I may be wrong & too lazy to check lol): deletion can only happen with a case 1, every other case really just sets up the b tree in a "neater" format and recursively calls delete until a case 1 is invoked and the desired element can be deleted. Another thing that took me some time to realise - for case 2a and 2b -> you do not replace with simply the left/right most element of the righ/left child but you must traverse and actually find the immediate predecessor/successor to the element you're trying to delete. Anyways, best of luck to everyone on their DSA journeys

vteckickedin
Автор

why do we care about root in 3b ? explain someone pls

mizit
Автор

I don't get why we care about the parent in the recursion path in 3b. Wouldn't the tree still be perfectly valid?

akam
Автор

thank you MIchael, watched all the playlist, good teaching

aramh
Автор

do we check this recursive if keys = min_keys for the root node as well? because technically there is nothing to shift, so nothing would change? Also what if that node we need to shift into is even deeper, do we shift then all the siblings' keys and every key in every node that's above? And If resulting node has too many keys we just do median and move up until the property is satisfied?

rodituclashroyale
Автор

Thank you, your code is so clean and clear! Yet, I'm still not clever enough to understand all...

happywhale
Автор

Why and what did we do in case 3B? I mean I don't understand the need to merge the two nodes! please help !!!!

devansh_u
Автор

Was looking for review before my final tomorrow, this clears up everything! Thank you!

DeltaNachos
Автор

Great video. It would have been great if you can visualize the code functions line by line. Nevertheless, This video is great.

Maxerom
Автор

t=m/2
where maximum nodes can be m-1
So for m=5 max nodes 4 and min nodes=t=2

atharvameher
Автор

you just know shit like this takes 2k loc to implement efficiently when even high level explanation isnt trivial

energy-tunes
Автор

What happened to the reverb? It gave you a ton of gravitas! (Thanks for the great videos btw).

gilesbbb
Автор

Slight formal error at 3a: it should be 2*(t-1) not 2t-1

MarkusKofler