简体   繁体   中英

B+ Tree creation

I am trying to understand B+ trees. I have done some reading about it.
One thing I am confused about. For creation of tree some articles give no. of keys=n, no. of pointers=1+n and some increase them by 1.

For example I have to make a B+ tree of order 3 with
6,2,9,16,12,17,21,18

Here the root shall have 3 numbers and 4 pointers OR 4 numbers and 5 pointers.

The order measures the branching factor, or the maximum number of keys. When the root is alone it has one pointer, to its own key. Once more nodes are added it will have 1 pointer to its key and then n pointers to its children, where n is the order of the tree. In this case the B+ tree root will have one pointer to number ( key ) and up to 3 pointer to node. for a total of 4 pointers.

For more one b+ tree creation look at the insertion section: B+ Tree Insertion Wikipedia

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM