Is there a rule for how to split the node in 2-3-4 tree?
E.g. If I insert 3, 7, 4, 9 into the 2-3-4 tree:
Will it be split like this (yellow) or that (green) as shown here:
Are both valid?
Is there a rule for how to split the node in 2-3-4 tree?
E.g. If I insert 3, 7, 4, 9 into the 2-3-4 tree:
Will it be split like this (yellow) or that (green) as shown here:
Are both valid?
Copyright © 2021 Jogjafile Inc.
Green. You need to consider the algorithm steps. Check out the the wikipedia page for insertion steps. The key part is to split a 4-node (which has 3 values) by moving the middle value up a level before considering the next insert.