Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Leer B Tree | Trees Part II
Data Structure & Algorithms PART I

bookB Tree

OperationBest Time ComplexityAverage Time ComplexityWorst Time ComplexityMemory Complexity
SearchO(log n)O(log n)O(log n)O(n)
InsertionO(log n)O(log n)O(log n)O(n)
DeletionO(log n)O(log n)O(log n)O(n)

Let’s talk briefly about the first non-binary tree - B-tree.

When building a B-tree, a factor t is used, which is called the minimum degree. The value of t depends upon disk block size. Each node except the root must have at least t - 1 and no more than 2t - 1 keys. n[x] - the number of keys in node x.

The keys in a node are stored in non-decreasing order. If x is not a leaf, then it has n[x] + 1 children. The keys of a node define a range for the keys of their children.

All leaves of a B-tree must be located at the same height, which is the height of the tree.

We can perform the same operations with the B-tree as we performed with BST: searching, insertion, deletion.

B-trees are also balanced trees, so the time to perform standard operations in them is proportional to the height. But, unlike other trees, they are designed specifically to work efficiently with disk memory, or rather, they minimize I / O type calls.

There are some more B-tree type trees:

  • B* tree
  • B⁺ tree

They differ a little bit but in general they have the same structure.

You can study them on your own.

That’s all for now!

Let’s take a quiz!

An example of the B-tree with t = 3

question mark

B* tree and B⁺ differ a lot from the B tree.

Select the correct answer

Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 4. Hoofdstuk 2

Vraag AI

expand

Vraag AI

ChatGPT

Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.

Awesome!

Completion rate improved to 4.35

bookB Tree

Veeg om het menu te tonen

OperationBest Time ComplexityAverage Time ComplexityWorst Time ComplexityMemory Complexity
SearchO(log n)O(log n)O(log n)O(n)
InsertionO(log n)O(log n)O(log n)O(n)
DeletionO(log n)O(log n)O(log n)O(n)

Let’s talk briefly about the first non-binary tree - B-tree.

When building a B-tree, a factor t is used, which is called the minimum degree. The value of t depends upon disk block size. Each node except the root must have at least t - 1 and no more than 2t - 1 keys. n[x] - the number of keys in node x.

The keys in a node are stored in non-decreasing order. If x is not a leaf, then it has n[x] + 1 children. The keys of a node define a range for the keys of their children.

All leaves of a B-tree must be located at the same height, which is the height of the tree.

We can perform the same operations with the B-tree as we performed with BST: searching, insertion, deletion.

B-trees are also balanced trees, so the time to perform standard operations in them is proportional to the height. But, unlike other trees, they are designed specifically to work efficiently with disk memory, or rather, they minimize I / O type calls.

There are some more B-tree type trees:

  • B* tree
  • B⁺ tree

They differ a little bit but in general they have the same structure.

You can study them on your own.

That’s all for now!

Let’s take a quiz!

An example of the B-tree with t = 3

question mark

B* tree and B⁺ differ a lot from the B tree.

Select the correct answer

Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 4. Hoofdstuk 2
some-alt