stack related question in microprocessor
can we also do queue operations i开发者_如何学Cn microprocessor? (given that the microprocessor supports stack operations )
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.
Have stack, want Queue??...
You can always implement queues in software. Refer this Q for more:
- StackOverflow.com/questions/69192/using-stack-as-queue
For a detailed discussion on how to implement a queue using stacks:
- GeeksforGeeks.org/?p=5009
GoodLUCK!!
精彩评论