0

can we also do queue operations in microprocessor? (given that the microprocessor supports stack operations )

letsc
  • 2,075
  • 5
  • 24
  • 43

2 Answers2

2

No. The stack is built in insofar as there's a register and operations to support it. There is no similar support for a queue.

If you want a queue, you need to implement it in code.

Carl Smotricz
  • 66,391
  • 18
  • 125
  • 167
0

Have stack, want Queue??...


You can always implement queues in software. Refer this Q for more:

For a detailed discussion on how to implement a queue using stacks:

GoodLUCK!!

Community
  • 1
  • 1
TheCodeArtist
  • 21,479
  • 4
  • 69
  • 130