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
a L 1 1 3 5 7 9 L 2 ... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (1 attachment)
954-M-L-A-L-S (8281).docx
120 KBs Word File
