137k views
2 votes
Which of the following data structures can erase from its beginning or its end in 0(1) time? Pick ONE option

-) vector
-) deque
-) stack
-) segment tree

User Volvox
by
8.2k points

1 Answer

3 votes

Answer:

A Circular Queue is the data structure that can erase from its beginning or its end in O(1) time

User Andy Lorenz
by
7.4k points