Match the items in Column 1 with the items in Column 2 in the following table:…
2024
Match the items in Column 1 with the items in Column 2 in the following table:
Column 1 | Column 2 |
(p) First In First Out | (i) Stacks |
(q) Lookup Operation | (ii) Queues |
(r) Last In First Out | (iii) Hash Tables |
- A.
(p) − (ii), (q) − (iii), (r) − (i)
- B.
(p) − (ii), (q) − (i), (r) − (iii)
- C.
(p) − (i), (q) − (ii), (r) − (iii)
- D.
(p) − (i), (q) − (iii), (r) − (ii)
Attempted by 354 students.
Show answer & explanation
Correct answer: A
Key insight: match each behaviour to the data structure that provides it.
(p) First In First Out → Queues. Queues remove elements in the same order they were added (FIFO).
(q) Lookup Operation → Hash Tables. Hash tables support fast average-time lookup by key (typically O(1)).
(r) Last In First Out → Stacks. Stacks remove the most recently added element first (LIFO).
Therefore the correct matching is (p) − (ii), (q) − (iii), (r) − (i).