223k views
5 votes
What is the additional space complexity of removing an element at the back of a queue with n elements and returning the queue with all other elements in their original order?.

1 Answer

7 votes

Question: What is the additional space complexity of removing an element at the back of a queue with n elements and returning the queue with all other elements in their original order?

Answer: O(1)

User EDS
by
5.1k points