Computer Science, asked by zambetti, 9 months ago

which of the following data structures can erase from its beginning or its end in O(1) time?

Answers

Answered by jayabala088
147

Answer:

Answer:Deleting the top element of a stack is O(1), which is valid because you only have access to the top of the stack. Hash tables also have amortized O(1) deletion for any element of the table.

Answered by adventureisland
21

Answer:

  • Circular Queue, I'd want to offer the exact answer. Before we look at why Circular Queue is the best solution.
  • let's look at why alternative structures aren't. Refer to edit for further information about array.
  • Let's pretend we're deleting the first node of a linked list. What is going to happen? The head of the list will be the second node.
  • The shape of the linked list will not be distorted after deleting the initial node because the entire linked list will remain unchanged. As a result, a linked list isn't an option.

Similar questions