Question: What is the time complexity of searching for an element in a stack?
Options:
Correct Answer: O(n)
Solution:
Searching for an element in a stack takes O(n) time in the worst case, as you may need to traverse all elements.