Multiple choice

What is the similarity between the operations on stack and queues, although they are entirely different?

  1. Both are LIFO lists.

  2. Both are FIFO lists.

  3. Both are linear data structures.

  4. Insertion in both the data structures take place at the same end.

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Stacks and queues are both linear data structures, meaning their elements are arranged in a sequential order. They differ in their access patterns (LIFO vs FIFO) and insertion/deletion points.