---
title: "B-tree from 78, 21, 14, 11, 97, 85, 74, 63"
subject: "Data Structure and Algorithm"
chapter: 6
key: "semester_4/data_structure_and_algorithm:btree-build-78-21-14"
source: https://www.bctengineer.com/q/semester_4/data_structure_and_algorithm/btree-build-78-21-14
site: BCT Engineering
---

# B-tree from 78, 21, 14, 11, 97, 85, 74, 63

Data Structure and Algorithm · Chapter 6: Trees

- Asked in: 2069 Bhadra, 6 marks
- Video: [B Tree example in Data structure in Hindi | Construct B tree having degree(order) 5](https://www.youtube.com/watch?v=DjibRi0n3aI) — CS Engineering Gyan
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_4/data_structure_and_algorithm/btree-build-78-21-14
- Whole chapter: https://www.bctengineer.com/md/semester_4/data_structure_and_algorithm/chapter-6

## Question

Construct B-tree from the data set given by 78, 21, 14, 11, 97, 85, 74, 63 showing each insertion step.

## Short answer

Assuming order 5, insert sequentially and split when a node holds 5 keys. Final tree: root [21 78] with leaf children [11 14], [63 74], [85 97].

## Answer

The order is not given, so a B-tree of order 5 is assumed (at most 4 keys per node; a node splits when it receives a fifth key, and the median moves up).

#### Insertion steps (order 5)

| Step | Insert | Tree after step | Action |
|---|---|---|---|
| 1 | 78 | `[78]` | fits in leaf |
| 2 | 21 | `[21 78]` | fits in leaf |
| 3 | 14 | `[14 21 78]` | fits in leaf |
| 4 | 11 | `[11 14 21 78]` | fits in leaf |
| 5 | 97 | `[21]{[11 14], [78 97]}` | leaf [11 14 21 78 97] overflows, split: 21 moves up; new root |
| 6 | 85 | `[21]{[11 14], [78 85 97]}` | fits in leaf |
| 7 | 74 | `[21]{[11 14], [74 78 85 97]}` | fits in leaf |
| 8 | 63 | `[21 78]{[11 14], [63 74], [85 97]}` | leaf [63 74 78 85 97] overflows, split: 78 moves up |

#### Final B-tree

```text
[21 78]
[11 14]  [63 74]  [85 97]
```

#### If order 3 is intended (at most 2 keys per node)
The final tree is:

```text
[74]
[21]  [85]
[11 14]  [63]  [78]  [97]
```
Here a split happens whenever a node gets a third key. The tree has three levels because the root splits when the key 63 pushes 74 up.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. The question gives no order. What does the answer assume?
   A. Order 3
   B. Order 4 with at most 4 children
   C. Order 2
   D. Order 5, with at most 4 keys per node
   Answer: D. The answer assumes order 5 and also shows the order 3 tree for comparison. (Key point: Assumed order)

2. With order 5, inserting 97 into [11 14 21 78] causes which split?
   A. 14 moves up
   B. 21 moves up to a new root
   C. 78 moves up
   D. 11 moves up
   Answer: B. [11 14 21 78 97] has median 21. (Key point: First split)

3. Inserting 63 into [74 78 85 97] makes 5 keys. Which key goes up?
   A. 74
   B. 85
   C. 63
   D. 78
   Answer: D. [63 74 78 85 97] has median 78, giving root [21 78]. (Key point: Second split)

4. Why does the order 3 tree have three levels?
   A. There are more keys
   B. The root splits when 63 pushes 74 up
   C. Order 3 does not need splitting
   D. Leaves are linked
   Answer: B. With max 2 keys, the split of a leaf pushes a key up and the parent overflows, so the root splits and makes a new level. (Key point: Order 3 tree)

## Close variants set in other exams

- [B-tree of order 5 for letters C N G A H ...](https://www.bctengineer.com/question.md?key=semester_4%2Fdata_structure_and_algorithm%3Abtree-order5-cngahekq) — Data Structure and Algorithm, chapter 6, asked 2×

## Related in Data Structure and Algorithm

- [Heap tree insertion and heap sort](https://www.bctengineer.com/question.md?key=semester_4%2Fdata_structure_and_algorithm%3Aheap-insertion-and-sort) — Data Structure and Algorithm, chapter 7
- [B-tree properties; order 5 for 3, 14, 7, ...](https://www.bctengineer.com/question.md?key=semester_4%2Fdata_structure_and_algorithm%3Abtree-properties-order5-3-14) — Data Structure and Algorithm, chapter 6, asked 2×
- [B-tree insertion algorithm; AVL of months](https://www.bctengineer.com/question.md?key=semester_4%2Fdata_structure_and_algorithm%3Abtree-insertion-avl-months) — Data Structure and Algorithm, chapter 6, asked 2×
- [AVL tree for 52, 65, 72, 15, 11, 32, 20](https://www.bctengineer.com/question.md?key=semester_4%2Fdata_structure_and_algorithm%3Aavl-build-52-65-72) — Data Structure and Algorithm, chapter 6
- [B-tree of order 5 for 82, 12, 22, ...](https://www.bctengineer.com/question.md?key=semester_4%2Fdata_structure_and_algorithm%3Abtree-order5-82-12-22) — Data Structure and Algorithm, chapter 6, asked 2×
- [B-tree of order 3 for 52, 46, 27, ...](https://www.bctengineer.com/question.md?key=semester_4%2Fdata_structure_and_algorithm%3Abtree-order3-52-46-27) — Data Structure and Algorithm, chapter 6

## Related in other subjects

- [Raft 14 m × 21 m, depth of foundation](https://www.bctengineer.com/question.md?key=semester_5%2Ffoundation_engineering%3Araft-14x21-depth-skempton) — Foundation Engineering, chapter 7
- [K-map Σ(1,2,3,8,9,10,11,14)+d(0,4,12), NAND](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Akmap-nand-1238-dc-0412) — Digital Logic, chapter 3, asked 5×
- [Gumbel design flood, 21 years data, 40-year life](https://www.bctengineer.com/question.md?key=semester_5%2Fengineering_hydrology%3Agumbel-21yr-life40-rel85-b) — Engineering Hydrology, chapter 6, asked 3×
- [K-map Σ(1,2,3,8,9,10,11,13,14)+d, POS](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Akmap-pos-form-12389) — Digital Logic, chapter 3
