Can you explain the difference between a stack and a queue and provide an example of when you would use each?

Technical