In this video, we look at the deletion operation in the B-Tree.
• Operation Overview: https://www.cs.rhodes.edu/~kirlinp/courses/db/s18/lectures/indices/btree-deletion.pdf
• Visualization: https://www.cs.usfca.edu/~galles/visualization/BTree.html
BIG ERROR:
• In delete(), we need an extra boolean variable to check if the key has been found because the last index may be out of bounds on the key array. So, if we iterate to the last child without finding the key, the if statement will check if the key at the out of bounds index matches the target, presenting an access error. The corrected version is on GitHub.
• Additionally, for case 3 of rebalance(), the merging of keys and children needs to take place separately.
• Website: https://michaelg29.github.io/
• Twitter: https://twitter.com/MichaelGrieco10
• Discord: https://discord.gg/Uj54bDF
• This Github Repo: https://github.com/michaelg29/yt-challenges
• This Playlist: https://www.youtube.com/playlist?list=PLysLvOneEETP-XQZQ6VTdMIHmxbGxX6nX
Listened to the Shadow of the Colossus OST by Kow Otani.