Prashnikaप्रश्निका
Code
About
‹ Back to the paper

Question 9(ii)

1 mark

Computer ScienceISC 2023 Computer Science Paper 1DifferentiateData structures

Answer the following.

Differentiate between a stack and a queue.

Open in the Stack and queue simulator

Answer

Answer

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.