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 />

• External nodes are empty<br />

Figure 6.1: A multiway search tree with a successful search path for the number<br />

6 (in green), and an unsuccessful search path for the number 26 (in red)<br />

Searching<br />

Searching in a general multiway search tree is analogous to searching in a binary<br />

search tree. Starting at the root, we trace a path in T as follows:<br />

<strong>1.</strong> For a d‐node v, compare the sought key with the keys k1,...,kd‐1 stored at<br />

v.<br />

2. If k is found then the search is a SUCCESS.<br />

3. Otherwise return to step 1 <strong>using</strong> the child vi such that ki‐1

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

Saved successfully!

Ooh no, something went wrong!