Stacks & Queues


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.