d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > 2-3 Tree Help
Add Reply New Topic New Poll
Member
Posts: 6,036
Joined: Nov 15 2012
Gold: 130.00
Oct 13 2015 05:00pm
So... kinda hard for me to post it, but I'll just post the scenario I have so far.

Need to create a 2-3 tree with: 10, 8, 4, 40, 30, 20, ...

So after inserting 10, 8, 4, 40, and 30
I get:
------------8,30
------4------10-----40
And I'm stuck on where the 20 goes.
Does it go in between 8,30 and becomes the new head node?
In which case the tree will look like this?:
------------20
--------8--------30
----4-----10---------40
(40 right child of 30) and (4 left child of 8 + 10 right child of 8)

Kinda puzzled.
Test in 2 hours too. Tee hee :D
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll