0% found this document useful (0 votes)
18 views6 pages

Part A

The document demonstrates how to insert keys into an empty B+ tree one by one, showing the tree after each insertion and maintaining the properties of a B+ tree.

Uploaded by

202017b2009
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views6 pages

Part A

The document demonstrates how to insert keys into an empty B+ tree one by one, showing the tree after each insertion and maintaining the properties of a B+ tree.

Uploaded by

202017b2009
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

1. Start with an empty tree.

2. Insert the keys one by one, maintaining the properties of a B+ tree.

Step 1: Insert 12

- Create a root node with 12 as the only key.

- The tree now looks like this:

```

12

```

Step 2: Insert 13

- Since 13 is greater than 12, it becomes the right child of 12.

- The tree now looks like this:

```

12

13

```

Step 3: Insert 15

- Since 15 is greater than 12 and 13, it becomes the right child of 13.

- The tree now looks like this:

```

12

13

15

```
Step 4: Insert 17

- Since 17 is greater than 12, 13, and 15, it becomes the right child of 15.

- The tree now looks like this:

```

12

13

15

17

```

Step 5: Insert 21

- Since 21 is greater than 12 and 13, it becomes the right child of 17.

- The tree now looks like this:

```

12

13

15

17

21

```

Step 6: Insert 27
- Since 27 is greater than 12, 13, 15, 17, and 21, it becomes the right child of 21.

- The tree now looks like this:

```

12

13

15

17

21

27

```

Step 7: Insert 29

- Since 29 is greater than 12, 13, 15, 17, 21, and 27, it becomes the right child of 27.

- The tree now looks like this:

```

12

13

15

17

21
\

27

29

```

Step 8: Insert 33

- Since 33 is greater than 12, 13, 15, 17, 21, 27, and 29, it becomes the right child of 29.

- The tree now looks like this:

```

12

13

15

17

21

27

29

33

```

Step 9: Insert 39

- Since 39 is greater than 12, 13, 15, 17, 21, 27, 29, and 33, it becomes the right child of 33.
- The tree now looks like this:

```

12

13

15

17

21

27

29

33

39

```

Step 10: Insert 41

- Since 41 is greater than 12, 13, 15, 17, 21, 27, 29, 33, and 39, it becomes the right child of 39.

- The tree now looks like this:

```

12

13

\
15

17

21

27

29

33

39

41

```

Now, the B+ tree is fully constructed with the given set of key values.

You might also like