Assume that a stack is to be implemented with a linked list rather than an array. What is the time complexity of the push and pop operations of the stack implemented using a linked list hoping that stack is implemented effectively?
A. $\mathbf{O}(\mathrm{n} \log \mathrm{k})$
B. $\mathrm{O}(\mathrm{nk})$
C. $O\left(\mathrm{n}^2\right)$
D. $\mathrm{O}\left(\mathrm{k}^2\right)$