Question: In a queue implemented using two stacks, what is the worst-case time complexity for the dequeue operation?
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 a time complexity of O(n).