SlideShare a Scribd company logo
To insert value X into a B-tree, there are 3 steps:
If there are M nodes after adding X, we say the node has overflowed. To repair this, we split the
node into three parts:
Left:
the first (M-1)/2 values
Middle:
the middle value (position 1+((M-1)/2)
Right:
the last (M-1)/2 values
Notice that Left and Right have just enough values to be made into individual nodes. That's
what we do... they become the left and right children of Middle, which we add in the appropriate
place in this node's parent.
But what if there is no room in the parent? If it overflows we do the same thing again: split it into
Left-Middle-Right, make Left and Right into new nodes and add Middle (with Left and Right as
its children) to the node above. We continue doing this until no overflow occurs, or until the root
itself overflows. If the root overflows, we split it, as usual, and create a new root node with
Middle as its only value and Left and Right as its children (as usual).
Solution
To insert value X into a B-tree, there are 3 steps:
If there are M nodes after adding X, we say the node has overflowed. To repair this, we split the
node into three parts:
Left:
the first (M-1)/2 values
Middle:
the middle value (position 1+((M-1)/2)
Right:
the last (M-1)/2 values
Notice that Left and Right have just enough values to be made into individual nodes. That's
what we do... they become the left and right children of Middle, which we add in the appropriate
place in this node's parent.
But what if there is no room in the parent? If it overflows we do the same thing again: split it into
Left-Middle-Right, make Left and Right into new nodes and add Middle (with Left and Right as
its children) to the node above. We continue doing this until no overflow occurs, or until the root
itself overflows. If the root overflows, we split it, as usual, and create a new root node with
Middle as its only value and Left and Right as its children (as usual).

More Related Content

More from venkt12345

import java.awt.Color;import java.awt.Insets;import java.awt.Con.pdf
import java.awt.Color;import java.awt.Insets;import java.awt.Con.pdfimport java.awt.Color;import java.awt.Insets;import java.awt.Con.pdf
import java.awt.Color;import java.awt.Insets;import java.awt.Con.pdf
venkt12345
 
Identify the computer fraud and abuse technique byThis computer f.pdf
Identify the computer fraud and abuse technique byThis computer f.pdfIdentify the computer fraud and abuse technique byThis computer f.pdf
Identify the computer fraud and abuse technique byThis computer f.pdf
venkt12345
 
Given A fund that starts with a zero balance with time zero. Fund .pdf
Given  A fund that starts with a zero balance with time zero. Fund .pdfGiven  A fund that starts with a zero balance with time zero. Fund .pdf
Given A fund that starts with a zero balance with time zero. Fund .pdf
venkt12345
 
Average.javaimport java.util.Scanner;public class Average{ .pdf
 Average.javaimport java.util.Scanner;public class Average{ .pdf Average.javaimport java.util.Scanner;public class Average{ .pdf
Average.javaimport java.util.Scanner;public class Average{ .pdf
venkt12345
 
Your equation is correct. Double replacement reac.pdf
                     Your equation is correct. Double replacement reac.pdf                     Your equation is correct. Double replacement reac.pdf
Your equation is correct. Double replacement reac.pdf
venkt12345
 
well while idenitfying aldehydeketone u must kee.pdf
                     well while idenitfying aldehydeketone u must kee.pdf                     well while idenitfying aldehydeketone u must kee.pdf
well while idenitfying aldehydeketone u must kee.pdf
venkt12345
 
The short answer is no. The reason why you cant p.pdf
                     The short answer is no. The reason why you cant p.pdf                     The short answer is no. The reason why you cant p.pdf
The short answer is no. The reason why you cant p.pdf
venkt12345
 
Since it gets in equilibrium when dissolved at sa.pdf
                     Since it gets in equilibrium when dissolved at sa.pdf                     Since it gets in equilibrium when dissolved at sa.pdf
Since it gets in equilibrium when dissolved at sa.pdf
venkt12345
 
phosphite ion .pdf
                     phosphite ion                                    .pdf                     phosphite ion                                    .pdf
phosphite ion .pdf
venkt12345
 
First, lets start with naming binary ionic comp.pdf
                     First, lets start with naming binary ionic comp.pdf                     First, lets start with naming binary ionic comp.pdf
First, lets start with naming binary ionic comp.pdf
venkt12345
 
dFdy=dFdu dudy +dFdv dvdy =e^(u+v) 0 +e.pdf
                     dFdy=dFdu  dudy +dFdv dvdy =e^(u+v)  0 +e.pdf                     dFdy=dFdu  dudy +dFdv dvdy =e^(u+v)  0 +e.pdf
dFdy=dFdu dudy +dFdv dvdy =e^(u+v) 0 +e.pdf
venkt12345
 
At STP22.4 L Is Equivalent to 1 moleThereforeNo. of Moles = 31.pdf
At STP22.4 L Is Equivalent to 1 moleThereforeNo. of Moles = 31.pdfAt STP22.4 L Is Equivalent to 1 moleThereforeNo. of Moles = 31.pdf
At STP22.4 L Is Equivalent to 1 moleThereforeNo. of Moles = 31.pdf
venkt12345
 
ANSWER violation of scientific law scientific la.pdf
                     ANSWER violation of scientific law scientific la.pdf                     ANSWER violation of scientific law scientific la.pdf
ANSWER violation of scientific law scientific la.pdf
venkt12345
 
Answer1. Since it requires an internal namespace and external, we.pdf
Answer1. Since it requires an internal namespace and external, we.pdfAnswer1. Since it requires an internal namespace and external, we.pdf
Answer1. Since it requires an internal namespace and external, we.pdf
venkt12345
 
activity A =N, where N= no of atoms(given) and =decay constant which.pdf
activity A =N, where N= no of atoms(given) and =decay constant which.pdfactivity A =N, where N= no of atoms(given) and =decay constant which.pdf
activity A =N, where N= no of atoms(given) and =decay constant which.pdf
venkt12345
 
a. Linear relationship between x and ySolutiona. Linear relati.pdf
a. Linear relationship between x and ySolutiona. Linear relati.pdfa. Linear relationship between x and ySolutiona. Linear relati.pdf
a. Linear relationship between x and ySolutiona. Linear relati.pdf
venkt12345
 
An overview is presented of gas chromatographyma.pdf
                     An overview is presented of gas chromatographyma.pdf                     An overview is presented of gas chromatographyma.pdf
An overview is presented of gas chromatographyma.pdf
venkt12345
 
4. a. Koch.Robert Koch is the founder of modern bacteriology, he i.pdf
4. a. Koch.Robert Koch is the founder of modern bacteriology, he i.pdf4. a. Koch.Robert Koch is the founder of modern bacteriology, he i.pdf
4. a. Koch.Robert Koch is the founder of modern bacteriology, he i.pdf
venkt12345
 
A buffer is a system of a weak acid and its conju.pdf
                     A buffer is a system of a weak acid and its conju.pdf                     A buffer is a system of a weak acid and its conju.pdf
A buffer is a system of a weak acid and its conju.pdf
venkt12345
 
a salt and water note for example, Na2O + 2HCl .pdf
                     a salt and water  note for example, Na2O + 2HCl .pdf                     a salt and water  note for example, Na2O + 2HCl .pdf
a salt and water note for example, Na2O + 2HCl .pdf
venkt12345
 

More from venkt12345 (20)

import java.awt.Color;import java.awt.Insets;import java.awt.Con.pdf
import java.awt.Color;import java.awt.Insets;import java.awt.Con.pdfimport java.awt.Color;import java.awt.Insets;import java.awt.Con.pdf
import java.awt.Color;import java.awt.Insets;import java.awt.Con.pdf
 
Identify the computer fraud and abuse technique byThis computer f.pdf
Identify the computer fraud and abuse technique byThis computer f.pdfIdentify the computer fraud and abuse technique byThis computer f.pdf
Identify the computer fraud and abuse technique byThis computer f.pdf
 
Given A fund that starts with a zero balance with time zero. Fund .pdf
Given  A fund that starts with a zero balance with time zero. Fund .pdfGiven  A fund that starts with a zero balance with time zero. Fund .pdf
Given A fund that starts with a zero balance with time zero. Fund .pdf
 
Average.javaimport java.util.Scanner;public class Average{ .pdf
 Average.javaimport java.util.Scanner;public class Average{ .pdf Average.javaimport java.util.Scanner;public class Average{ .pdf
Average.javaimport java.util.Scanner;public class Average{ .pdf
 
Your equation is correct. Double replacement reac.pdf
                     Your equation is correct. Double replacement reac.pdf                     Your equation is correct. Double replacement reac.pdf
Your equation is correct. Double replacement reac.pdf
 
well while idenitfying aldehydeketone u must kee.pdf
                     well while idenitfying aldehydeketone u must kee.pdf                     well while idenitfying aldehydeketone u must kee.pdf
well while idenitfying aldehydeketone u must kee.pdf
 
The short answer is no. The reason why you cant p.pdf
                     The short answer is no. The reason why you cant p.pdf                     The short answer is no. The reason why you cant p.pdf
The short answer is no. The reason why you cant p.pdf
 
Since it gets in equilibrium when dissolved at sa.pdf
                     Since it gets in equilibrium when dissolved at sa.pdf                     Since it gets in equilibrium when dissolved at sa.pdf
Since it gets in equilibrium when dissolved at sa.pdf
 
phosphite ion .pdf
                     phosphite ion                                    .pdf                     phosphite ion                                    .pdf
phosphite ion .pdf
 
First, lets start with naming binary ionic comp.pdf
                     First, lets start with naming binary ionic comp.pdf                     First, lets start with naming binary ionic comp.pdf
First, lets start with naming binary ionic comp.pdf
 
dFdy=dFdu dudy +dFdv dvdy =e^(u+v) 0 +e.pdf
                     dFdy=dFdu  dudy +dFdv dvdy =e^(u+v)  0 +e.pdf                     dFdy=dFdu  dudy +dFdv dvdy =e^(u+v)  0 +e.pdf
dFdy=dFdu dudy +dFdv dvdy =e^(u+v) 0 +e.pdf
 
At STP22.4 L Is Equivalent to 1 moleThereforeNo. of Moles = 31.pdf
At STP22.4 L Is Equivalent to 1 moleThereforeNo. of Moles = 31.pdfAt STP22.4 L Is Equivalent to 1 moleThereforeNo. of Moles = 31.pdf
At STP22.4 L Is Equivalent to 1 moleThereforeNo. of Moles = 31.pdf
 
ANSWER violation of scientific law scientific la.pdf
                     ANSWER violation of scientific law scientific la.pdf                     ANSWER violation of scientific law scientific la.pdf
ANSWER violation of scientific law scientific la.pdf
 
Answer1. Since it requires an internal namespace and external, we.pdf
Answer1. Since it requires an internal namespace and external, we.pdfAnswer1. Since it requires an internal namespace and external, we.pdf
Answer1. Since it requires an internal namespace and external, we.pdf
 
activity A =N, where N= no of atoms(given) and =decay constant which.pdf
activity A =N, where N= no of atoms(given) and =decay constant which.pdfactivity A =N, where N= no of atoms(given) and =decay constant which.pdf
activity A =N, where N= no of atoms(given) and =decay constant which.pdf
 
a. Linear relationship between x and ySolutiona. Linear relati.pdf
a. Linear relationship between x and ySolutiona. Linear relati.pdfa. Linear relationship between x and ySolutiona. Linear relati.pdf
a. Linear relationship between x and ySolutiona. Linear relati.pdf
 
An overview is presented of gas chromatographyma.pdf
                     An overview is presented of gas chromatographyma.pdf                     An overview is presented of gas chromatographyma.pdf
An overview is presented of gas chromatographyma.pdf
 
4. a. Koch.Robert Koch is the founder of modern bacteriology, he i.pdf
4. a. Koch.Robert Koch is the founder of modern bacteriology, he i.pdf4. a. Koch.Robert Koch is the founder of modern bacteriology, he i.pdf
4. a. Koch.Robert Koch is the founder of modern bacteriology, he i.pdf
 
A buffer is a system of a weak acid and its conju.pdf
                     A buffer is a system of a weak acid and its conju.pdf                     A buffer is a system of a weak acid and its conju.pdf
A buffer is a system of a weak acid and its conju.pdf
 
a salt and water note for example, Na2O + 2HCl .pdf
                     a salt and water  note for example, Na2O + 2HCl .pdf                     a salt and water  note for example, Na2O + 2HCl .pdf
a salt and water note for example, Na2O + 2HCl .pdf
 

Recently uploaded

GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptxSolid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
Denish Jangid
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
Excellence Foundation for South Sudan
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
bennyroshan06
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 

Recently uploaded (20)

GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptxSolid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 

To insert value X into a B-tree, there are 3 stepsIf there are M .pdf

  • 1. To insert value X into a B-tree, there are 3 steps: If there are M nodes after adding X, we say the node has overflowed. To repair this, we split the node into three parts: Left: the first (M-1)/2 values Middle: the middle value (position 1+((M-1)/2) Right: the last (M-1)/2 values Notice that Left and Right have just enough values to be made into individual nodes. That's what we do... they become the left and right children of Middle, which we add in the appropriate place in this node's parent. But what if there is no room in the parent? If it overflows we do the same thing again: split it into Left-Middle-Right, make Left and Right into new nodes and add Middle (with Left and Right as its children) to the node above. We continue doing this until no overflow occurs, or until the root itself overflows. If the root overflows, we split it, as usual, and create a new root node with Middle as its only value and Left and Right as its children (as usual). Solution To insert value X into a B-tree, there are 3 steps: If there are M nodes after adding X, we say the node has overflowed. To repair this, we split the node into three parts: Left: the first (M-1)/2 values Middle: the middle value (position 1+((M-1)/2) Right: the last (M-1)/2 values Notice that Left and Right have just enough values to be made into individual nodes. That's what we do... they become the left and right children of Middle, which we add in the appropriate place in this node's parent. But what if there is no room in the parent? If it overflows we do the same thing again: split it into Left-Middle-Right, make Left and Right into new nodes and add Middle (with Left and Right as its children) to the node above. We continue doing this until no overflow occurs, or until the root
  • 2. itself overflows. If the root overflows, we split it, as usual, and create a new root node with Middle as its only value and Left and Right as its children (as usual).