Jump to content
  • Advertisement
Sign in to follow this  
ultramailman

Top-down insertion and deletion for 2-3 tree possible?

This topic is 2057 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello
Is it possible to insert to or delete from a 2-3 tree in a top-down fashion, like it is with 2-4 trees?

I am trying to learn about red black trees, but I decided I would implement one that corresponds with 2-3 trees instead of 2-4 trees.

Recursive insertion is implemented, but I just can't figure out how to do it top-down, iteratively, and without using a stack of ancestors.

I know in the case of 2-4 trees, top-down insertion is done by splitting 4-nodes before reaching the leaf to guarantee a leaf that is 2-node or 3-node, but this doesn't seem to work with 2-3 trees because of the lower number of keys allowed.

I suspect 2-3 trees can't be inserted into in a top-down fashion. What do you think?

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!