Question: In a queue implemented using two stacks, what is the time complexity of the dequeue operation in the worst case?
Options:
Correct Answer: O(n)
Solution:
In the worst case, the dequeue operation may require transferring all elements from one stack to another, resulting in O(n) time complexity.