Consider the following statements: i) First-in-first out types of computations…

1996

Consider the following statements:

i) First-in-first out types of computations are efficiently supported by STACKS.
ii) Implementing LISTS on linked lists is more efficient than implementing LISTS on an array for almost all the basic LIST operations.
iii) Implementing QUEUES on a circular array is more efficient than implementing QUEUES on a linear array with two indices.
iv) Last-in-first-out type of computations are efficiently supported by QUEUES.

  1. A.

    (ii) and (iii) are true

  2. B.

    (i) and (ii) are true

  3. C.

    (iii) and (iv) are true

  4. D.

    (ii) and (iv) are true

Attempted by 126 students.

Show answer & explanation

Correct answer: A

Statement (i) is false because stacks operate on a Last-In-First-Out basis, not First-In-First-Out.

Statement (ii) is correct as linked lists offer better efficiency for list operations compared to arrays.

Statement (iii) is correct because circular arrays optimize queue memory usage compared to linear implementations.

Statement (iv) is false because queues are designed for FIFO operations, whereas LIFO applies to stacks.

Therefore, the combination of (ii) and (iii) aligns with Option 0.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Gate Guidance By Sanchit Sir