You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minimumItemsInNode := 1
tree := NewTree(minimumItemsInNode)
for i := 1; i < 100; i++ {
value := strconv.Itoa(i)
tree.Put(value, value)
tree.Find(value)
}
used while creating B-tree of 2-3 structure, creates impossible combination of
6
| \ \
(3), (5, 8), (7)
Is there something I am missing? This should be contradicted even while it has 1 element at the root (6).
Is there an inner constraint for "ignoring" childs without removing the references? That was my guess shot.
The text was updated successfully, but these errors were encountered:
If I understand your code correctly, 2-3 tree should be created by setting minimumItemsInNode := 1 in NewTree(minimumItemsInNode), as 2-3 tree has minimum key count of 1 and max key count of 2.
After that I just looped by putting the values 1..2..3..4 etc. by Put, as you can see in my code attachment
I didn't remove any items, I just noticed in debugging, that there is at the second layer on right of root impossible combination on inner node with value "6", containing 3 other nodes as children, with values of (3), (5, 8), (7) in the memory.
used while creating B-tree of 2-3 structure, creates impossible combination of
6
| \ \
(3), (5, 8), (7)
Is there something I am missing? This should be contradicted even while it has 1 element at the root (6).
Is there an inner constraint for "ignoring" childs without removing the references? That was my guess shot.
The text was updated successfully, but these errors were encountered: