What is the difference between a stack and a queue?
A. A stack is a first-in-first-out (FIFO) data structure, while a queue is a last-in-first-out (LIFO) data structure.
B. A stack is a last-in-first-out (LIFO) data structure, while a queue is a first-in-first-out (FIFO) data structure.
C. A stack and a queue are the same data structure.
D. None of the above
Answer:B
What is the difference between a stack and a queue?
A. A stack is a first-in-first-out (FIFO) data structure, while a queue is a last-in-first-out (LIFO) data structure. B. A stack is a last-in-first-out (LIFO) data structure, while a queue is a first-in-first-out (FIFO) data structure. C. A stack and a queue are the same data structure. D. None of the above