For merging two sorted lists of sizes $m$ and $n$ into a sorted list of size $m+n$, we require comparisons of
$O(\log m + \log n)$
Answer: Option C.
The number of moves are however always $m+n$ so that we can term it as $\Theta(m+n)$. But the number of comparisons vary as per the input. In the best case the comparisons are $Min(m,n)$ and in worst case they are $m+n-1$.
If there are 2 arrays like this
A: 10 20 60 90
B: 30 50 70 100
And store the resultent array in C[ ]
while((a!=NULL) && (b!=NULL))
For combinatorics , can add balls and bin...