开发者

stack related question in microprocessor

开发者 https://www.devze.com 2022-12-27 23:02 出处:网络
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 su

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!!

0

精彩评论

暂无评论...
验证码 换一张
取 消