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 breadth first traversal, the processing proceeds horizontally from the root<br />

to all its children, then to its children’s children and so forth until all nodes have<br />

been processed.<br />

In the preorder traversal, the root node, is processed first, followed by the left<br />

subtree, and then the right subtree.<br />

In the inorder traversal processes the left subtree first, then the root, and finally<br />

the right subtree.<br />

In the postorder traversal it processes the root node after (post) the left and<br />

right subtrees have been processed<br />

A. Full binary tree of height 3<br />

B. Complete binary tree<br />

1 1<br />

B.<br />

2 3<br />

2 3<br />

4 5 6<br />

Basic terminology:<br />

A. B.<br />

A A<br />

B B<br />

C<br />

Prepared By :­<br />

Er. Harvinder Singh<br />

Assist Prof., CSE, H.C.T.M (Kaithal) C<br />

Page ‐ 182 ‐<br />

4

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

Saved successfully!

Ooh no, something went wrong!