PRASHNIKAप्रश्निका
Back to the paper

Differentiate between a stack and a queue.

Computer Science20231 markShort answer

Answer

Answer

AI
Stack: a linear data structure that works on the LIFO (Last In First Out) principle; insertion (push) and deletion (pop) take place at the same end, called the top. Queue: a linear data structure that works on the FIFO (First In First Out) principle; insertion takes place at the rear end and deletion at the front end.
Data structures

From ISC 2023 Computer Science Paper 1, question 9(ii).