News for hackers. Stuff that matters.
Re:B-Trees: More Than I Thought I'd Want to Know by cogman10 on Wednesday August 18, 2021 @01:59PM (#28224838)
Perhaps it was just my professor, but what really helped was we first did red-black trees and after doing that our teacher explained to us that red black trees were just a type of B-Tree. Once you have that, it's pretty easy to go from one to the other.
Re:B-Trees: More Than I Thought I'd Want to Know by jasonwatkinspdx on Thursday August 19, 2021 @01:15AM (#28230582)
That's the approach Sedeewick of the (in?)famous textbook takes. He also has one neat tweak that simplifies rebalancing: when traversing a B-tree for insertion, preemptively split any full nodes as you visit them. This ensures there will always been room in a parent node if child nodes force keys up.