Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9195639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:40:20+00:00 2026-06-17T21:40:20+00:00

For a B+ tree insertion why would you traverse down the tree then back

  • 0

For a B+ tree insertion why would you traverse down the tree then back upwards splitting the parents?

Wikipedia suggests this method of insertion:

Perform a search to determine what bucket the new record should go
into.

  • If the bucket is not full (at most b – 1 entries after the insertion), add the record.
  • Otherwise, split the bucket.
    • Allocate new leaf and move half the bucket’s elements to the new bucket.
    • Insert the new leaf’s
      smallest key and address into the parent.
    • If the parent is full, split it too.
      • Add the middle key to the parent node.
    • Repeat until a parent is found that need not split.

If the root splits, create a new root which has one key and two
pointers.

Why would you traverse down then tree and then go back up performing the splits? Why not split the nodes as you encounter them on the way down?

To me, the proposed method performs twice the work and requires more bookkeeping as well.

Can anyone explain why this is the preferred method for insertion as opposed to splitting on the way down and what the disadvantages are for inserting during the traversal?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T21:40:21+00:00Added an answer on June 17, 2026 at 9:40 pm

    You have to backtrack up the tree because you don’t actually know whether a split is required at the lowest level until you get there.

    It’s all there in the phrase “If the bucket is not full, …”.

    You should also be aware that it’s nowhere near twice the work. Since you’re remembering all sorts of stuff on the way down (node pointers, indexes within the node, and so on), there’s not as much calculation or searching on the way back up.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How would I implement a bottom-down insertion of a 2-3-4 tree in java?
Ok, I am beyond exhausted with this problem, so I figured I would get
That is, would I be better suited to use some kind of tree or
didn't find an answer to this. I like KeyedCollection, because it keeps the insertion
Ok, I ran into this tree question which LOOKED simple, but started driving me
I would like to ask a question about inserting element into a binary tree,
Consider an initially empty RB-tree, which we insert m elements into. Inserting an element
tree C:\My files >> pathtree.txt It does not seem to work. What I expected
Tree traversal refers to the process of visiting each node in a tree data
The tree-view is loaded with some data from a DB. I want to filter

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.