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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

+ 2 3 4<br />

+ 2 3 4<br />

+ 2 3 4<br />

5 4<br />

Binary Search tree.<br />

Answer 20<br />

A binary search tree is a binary tree with the nodes arranged so as to support<br />

binary search, that is:<br />

<strong>1.</strong> THE LEFT CHILD’S KEY IS ALWAYS LESS THAN THE PARENT’S KEY;<br />

2. THE RIGHT CHILD’S KEY IS ALWAYS GREATER THAN THE PARENT’S KEY.<br />

We can visualize each node as having two pointers – a Left pointer to the left<br />

child and a Right pointer to the right child.<br />

Prepared By :­<br />

Er. Harvinder Singh<br />

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

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

Saved successfully!

Ooh no, something went wrong!