The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 398 Weeks Ago, 4 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
Write a member function that merges two instances of the Sorted List ADT using the following specification.
Â
MergeLists(SortedType& list, SortedType& result)
Function: Merges two sorted lists into a third sorted list. Preconditions: Self and list are in ascending order by key.  Self and list do not have any keys in common; self and list are not empty. Postconditions: Result is a sorted list that contains all of  the items from self and list.
Assume that Sorted Type is a tem plated class and that the relational operators are defined for Item Type.
Â
a. Write the prototype for Merge Lists.
Â
b. Write the code for the function.
c. Describe the algorithm in terms of Big-O notation.
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll