 |
 |
 |
 |
 |
 |
 |
 |
 |
| • |
So,
here is the insertion algorithm.
|
|
|
| • |
To
insert a value into a 2-3 tree we first must locate
|
|
the
leaf which the search for such a value would
|
|
|
terminate.
|
|
|
| • |
If
the leaf only contains 1 data value, we insert the
|
|
|
new
value into the leaf and we are done.
|
|
|
| • |
However,
if the leaf contains two data values, we
|
|
|
must
split it into two nodes (this is called splitting a
|
|
leaf).
|
|