Accenture interview question

Can you explain the difference between a stack and a queue? Provide a real-world example where each would be used.

Interview Answer

Anonymous

11 Dec 2024

The key difference lies in the order of insertion and removal: LIFO for stacks and FIFO for queues.