lists and add it to the end of the output sequencesuntil one of the two input lists is emptyat which point we copy the remainder of the other list to we show an example execution of this version of algorithm merge in figure code fragment algorithm merge for merging two sorted sequences implemented as linked lists the running time for merging we analyze the running time of the merge algorithm by making some simple observations let and be the number of elements of and respectively algorithm merge has three while loops independent of whether we are analyzing the array-based version or the list-based versionthe operations performed inside each loop take ( time each the key observation is that during each iteration of one of the loopsone element is copied or moved from either or into (and that element is considered no furthersince no insertions are performed into or this observation implies that the overall number of iterations of the three loops is + thusthe running time of algorithm merge is ( figure example of an execution of the algorithm merge shown in code fragment