(1) Mid Element First: This is incorrect. Stacks do not operate on the principle of processing the middle element first.
(2) First In First Out: This describes a queue, not a stack. A queue processes elements in the order they were added.
(3) Last In First Out: This is the correct principle for a stack. The last element added (pushed) onto the stack is the first element removed (popped).
(4) Last In Last Out: This doesn't represent a standard data structure principle.
Therefore, a stack works on the principle of (3) Last In First Out.
List-I (Term) | List-II (Description) |
(A) Prefix | (I) In this, the element entered first will be removed last |
(B) Postfix | (II) In this, the element entered first will be removed first. |
(C) Queue | (III) In this, the operator is placed before the operands. |
(D) Stack | (IV) In this, the operator is placed after the operands. |
List-I (Words) | List-II (Definitions) |
(A) Theocracy | (I) One who keeps drugs for sale and puts up prescriptions |
(B) Megalomania | (II) One who collects and studies objects or artistic works from the distant past |
(C) Apothecary | (III) A government by divine guidance or religious leaders |
(D) Antiquarian | (IV) A morbid delusion of one’s power, importance or godliness |