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 |
Answer
(A)
Explanation
Each phrase in Column 1 is the defining behaviour of one structure:
- (p) First In First Out: a queue removes items in the order they arrived, like a line at a counter, so (p) − (ii).
- (q) Lookup: a hash table exists to find a value by its key in expected constant time, so (q) − (iii).
- (r) Last In First Out: a stack always removes the most recently added item, like a pile of plates, so (r) − (i).
Only option (A) has all three pairs; (C) and (D) pair FIFO with stacks, and (B) pairs lookup with stacks.
Answer: A