Q2) Time complexity of finding minimum in a stack after each pop(). According to me it should be O(n) since to find minimum I should pop out all the elements in the stack and go through them… But it is given O(1) as the answer.
Q3) Time complexity to find nth fibonacci number. How is the answer O(log n)?
Q13) How do we say that this is omega (n^2) and not O(n^2)?
Thanks in advance!