Comments (3)
Hey @wortelus :)
I'm not sure how you got to the tree you mention from the code you added.
- How did you create the 2-3 tree?
- And how did you remove items? What was your starting tree?
from btree.
Hi :) thanks for the quick response!
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.
I did not find out why would that be :/
from btree.
I'll take a look at it and let you know.
from btree.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from btree.