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

[ End of if statement ]<br />

2. [ Finished ]<br />

Return<br />

Procedure : merge (A, first, mid, last )<br />

Here first, mid and last represents the first, middle and last position of array A.<br />

In this procedure we use auxiliary array TEMP. The variables i, j, k are local<br />

variables.<br />

<strong>1.</strong> [ Initialise ]<br />

i = first, j = mid + 1, k = first<br />

2. [ compare elements and output the smaller in array TEMP ]<br />

Repeat while (i

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

Saved successfully!

Ooh no, something went wrong!