A

Admin • 833.24K Points
Coach

Q. Suppose implementation supports an instruction REVERSE, which reverses the order of elements on the stack, in addition to the PUSH and POP instructions. Which one of the following statements is TRUE with respect to this modified stack?

  • (A) a queue cannot be implemented using this stack.
  • (B) a queue can be implemented where enqueue takes a single instruction and dequeue takes a sequence of two instructions.
  • (C) a queue can be implemented where enqueue takes a sequence of three instructions and dequeue takes a single instruction.
  • (D) a queue can be implemented where both enqueue and dequeue take a single instruction each.

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.