Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 auxiliary array smallest AGLORHIMST Merging Merge. n Keep track of smallest element in each sorted half. n Insert smallest of two elements into auxiliary.

Similar presentations


Presentation on theme: "1 auxiliary array smallest AGLORHIMST Merging Merge. n Keep track of smallest element in each sorted half. n Insert smallest of two elements into auxiliary."— Presentation transcript:

1 1 auxiliary array smallest AGLORHIMST Merging Merge. n Keep track of smallest element in each sorted half. n Insert smallest of two elements into auxiliary array. n Repeat until done. A

2 2 auxiliary array smallest AGLORHIMST A Merging Merge. n Keep track of smallest element in each sorted half. n Insert smallest of two elements into auxiliary array. n Repeat until done. G

3 3 auxiliary array smallest AGLORHIMST AG Merging Merge. n Keep track of smallest element in each sorted half. n Insert smallest of two elements into auxiliary array. n Repeat until done. H

4 4 auxiliary array smallest AGLORHIMST AGH Merging Merge. n Keep track of smallest element in each sorted half. n Insert smallest of two elements into auxiliary array. n Repeat until done. I

5 5 auxiliary array smallest AGLORHIMST AGHI Merging Merge. n Keep track of smallest element in each sorted half. n Insert smallest of two elements into auxiliary array. n Repeat until done. L

6 6 auxiliary array smallest AGLORHIMST AGHIL Merging Merge. n Keep track of smallest element in each sorted half. n Insert smallest of two elements into auxiliary array. n Repeat until done. M

7 7 auxiliary array smallest AGLORHIMST AGHILM Merging Merge. n Keep track of smallest element in each sorted half. n Insert smallest of two elements into auxiliary array. n Repeat until done. O

8 8 auxiliary array smallest AGLORHIMST AGHILMO Merging Merge. n Keep track of smallest element in each sorted half. n Insert smallest of two elements into auxiliary array. n Repeat until done. R

9 9 auxiliary array first half exhausted smallest AGLORHIMST AGHILMOR Merging Merge. n Keep track of smallest element in each sorted half. n Insert smallest of two elements into auxiliary array. n Repeat until done. S

10 10 auxiliary array first half exhausted smallest AGLORHIMST AGHILMORS Merging Merge. n Keep track of smallest element in each sorted half. n Insert smallest of two elements into auxiliary array. n Repeat until done. T

11 11 auxiliary array first half exhausted second half exhausted AGLORHIMST AGHILMORST Merging Merge. n Keep track of smallest element in each sorted half. n Insert smallest of two elements into auxiliary array. n Repeat until done.


Download ppt "1 auxiliary array smallest AGLORHIMST Merging Merge. n Keep track of smallest element in each sorted half. n Insert smallest of two elements into auxiliary."

Similar presentations


Ads by Google