GATE / CS ARCHIVE

GATE CSE 1996 / QUESTION 1.12

List and queue statements

Data Structures · Stacks & Queues · Full GATE CSE 1996 paper

GATE 1996, Q1.12 1 mark · MCQ
Report issue

Stacks & Queues

Question 1.12, GATE 1996: Assess FIFO for stacks, broad linked-list efficiency, circular queues reusing array slots, and LIFO for queues.
Question 1.12, GATE 1996: Assess FIFO for stacks, broad linked-list efficiency, circular queues reusing array slots, and LIFO for queues.
Tap to enlarge
Your answer
Answer & solution

Answer: A under the intended linked-list operation model: statements ii and iii (no official key was published)

A stack is LIFO, not FIFO; a queue is FIFO, not LIFO. In a circular array queue, the rear wraps around to locations freed by dequeues, so statement iii is correct. Linked lists permit constant-time insertion or deletion when the relevant node or predecessor is already known, avoiding array shifts; this motivates statement ii and the intended pair ii,iii. However, the assertion that linked lists are more efficient for almost all basic operations is not a mathematical universal: indexed access and cache-local traversal often favor arrays, and locating a node can require linear time. The operation and representation model must be specified.

Original paper, page 2