Two linked lists having n and m elements are stored in sorted order. What is the worst case complexity of program to print common elements of two lists ?
$\begin{align*} &A. \ \ O(n) \\ &B. \ \ \text{max}(m,n) \\ &C. \ \ \text{min}(m,n) \\ &D. \ \ m+n \end{align*}$