10.09.2013 Views

1. Advanced Data Structure using C++

1. Advanced Data Structure using C++

1. Advanced Data Structure using C++

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

LECTURE NOTES OF ADVANCED DATA STRUCTURE (MT-CSE 110)<br />

The worst case height of a B‐Tree is:<br />

where M is the maximum number of children a node can have.<br />

The m‐way tree has the potential to greatly reduce the height of a tree. A B‐<br />

Tree is an m‐way search tree with the following additional properties:<br />

The root is either a leaf or it has 2…..m subtrees.<br />

All internal nodes have at least [m/2] nonnull subtrees at most m nonnull<br />

subtrees.<br />

All leaf nodes are at the same level; that is , the tree is perfectly balanced.<br />

A leaf node has at least [m/2] – 1 and at the most m‐1 entries.<br />

When the leaf node is full, we have a condition known as overflow. Overflow<br />

requires that the leaf node be split into two nodes, each containing half of the<br />

data.<br />

For example:<br />

a.<br />

b. Original node new node<br />

c.<br />

11 14 21 78 97<br />

11 14 21 78 78 97<br />

create new right subtree<br />

21<br />

11<br />

Prepared By :­<br />

14 78 97<br />

Er. Harvinder Singh<br />

Assist Prof., CSE, H.C.T.M (Kaithal) Page ‐ 214 ‐

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!