1 / 11

Merging

A. G. L. O. R. H. I. M. S. T. Merging. Merge. Keep track of smallest element in each sorted half. Insert smallest of two elements into auxiliary array. Repeat until done. smallest. smallest. A. auxiliary array. smallest. smallest. A. G. L. O. R. H. I. M. S. T.

drewl
Download Presentation

Merging

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A G L O R H I M S T Merging • Merge. • Keep track of smallest element in each sorted half. • Insert smallest of two elements into auxiliary array. • Repeat until done. smallest smallest A auxiliary array

  2. smallest smallest A G L O R H I M S T Merging • Merge. • Keep track of smallest element in each sorted half. • Insert smallest of two elements into auxiliary array. • Repeat until done. A G auxiliary array

  3. smallest smallest A G L O R H I M S T Merging • Merge. • Keep track of smallest element in each sorted half. • Insert smallest of two elements into auxiliary array. • Repeat until done. A G H auxiliary array

  4. smallest smallest A G L O R H I M S T Merging • Merge. • Keep track of smallest element in each sorted half. • Insert smallest of two elements into auxiliary array. • Repeat until done. A G H I auxiliary array

  5. smallest smallest A G L O R H I M S T Merging • Merge. • Keep track of smallest element in each sorted half. • Insert smallest of two elements into auxiliary array. • Repeat until done. A G H I L auxiliary array

  6. smallest smallest A G L O R H I M S T Merging • Merge. • Keep track of smallest element in each sorted half. • Insert smallest of two elements into auxiliary array. • Repeat until done. A G H I L M auxiliary array

  7. smallest smallest A G L O R H I M S T Merging • Merge. • Keep track of smallest element in each sorted half. • Insert smallest of two elements into auxiliary array. • Repeat until done. A G H I L M O auxiliary array

  8. smallest smallest A G L O R H I M S T Merging • Merge. • Keep track of smallest element in each sorted half. • Insert smallest of two elements into auxiliary array. • Repeat until done. A G H I L M O R auxiliary array

  9. smallest A G L O R H I M S T Merging • Merge. • Keep track of smallest element in each sorted half. • Insert smallest of two elements into auxiliary array. • Repeat until done. first halfexhausted A G H I L M O R S auxiliary array

  10. smallest A G L O R H I M S T Merging • Merge. • Keep track of smallest element in each sorted half. • Insert smallest of two elements into auxiliary array. • Repeat until done. first halfexhausted A G H I L M O R S T auxiliary array

  11. A G L O R H I M S T Merging • Merge. • Keep track of smallest element in each sorted half. • Insert smallest of two elements into auxiliary array. • Repeat until done. first halfexhausted second halfexhausted A G H I L M O R S T auxiliary array

More Related