Q
Which pairing of abstract data type and access order is correct?
-
A
Both are FIFO
-
B
Stack: LIFO; Queue: FIFO
-
C
Both are LIFO
-
D
Stack: FIFO; Queue: LIFO
Correct Answer:
B. Stack: LIFO; Queue: FIFO
Explanation:
A stack adds and removes at one end. A queue adds at the rear and removes from the front.