Whether to use a certain data structure is not only determined by the speed, especially when the speed is close. Between queue and stack, there is also a legibility consideration there, and whichever makes more sense logically should be used.
In reply to Re: To push and pop or not to push and pop?
by pg
in thread To push and pop or not to push and pop?
by GrandFather
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |