Question: (a) Give an example of two lists L1, L2, each of which is in ascending order and contains five elements, and where nine comparisons are

(a) Give an example of two lists L1, L2, each of which is in ascending order and contains five elements, and where nine comparisons are needed to merge L1, L2 by the algorithm given in Lemma 12.1.
(b) Let m, n e Z+ with m < n. Give an example of two lists L1, L2, each of which is in ascending order, where L1 has m elements, L2 has n elements, and m + n - 1 comparisons are needed to merge L1, L2 by the algorithm given in Lemma 12.1.

Step by Step Solution

3.40 Rating (166 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a L 1 1 3 5 7 9 L 2 ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Document Format (1 attachment)

Word file Icon

954-M-L-A-L-S (8281).docx

120 KBs Word File

Students Have Also Explored These Related Linear Algebra Questions!