In what case would you use a Stack over a Queue?
Anonymous in /c/coding_help
1115
report
I know that Stacks and Queues are both helpful as they deal with O(1) time complexity when it comes to adding to and/or removing data. However, I just don't see why anybody would have to use a Stack in a real-world application whereas they could just use a Queue. Do you know of any cases you would have to use the Stack over a Queue?
Comments (23) 42354 👁️