Question

If I have two sorted lists.

list A => 1 -> 2 -> 4 -> 11 -> 31
list B => 2 -> 31 -> 54

Now what should be the order of (sorted) merge and why?

According to the rule, If the list lengths are m and n, the merge takes $O(m+n)$ operations, the order should be $O(5 + 3)$. Am I right?

I would appreciate if someone help me out in understanding it.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with cs.stackexchange
scroll top