3 ms·
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
by cogman10 5y ago
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.
- jasonwatkinspdx 5y agoThat'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.