UGC NET CS 2023Data Structures and Algorithms › Data StructuresVerified
UGC NET CS 2023 PYQ: Given below are two statements: one is labelled as Assertion $\text{A}$ and the other is labelled as Reason…
Given below are two statements: one is labelled as Assertion $\text{A}$ and the other is labelled as Reason $\text{R}$.
Assertion A: It is possible to create doubly linked list using only one pointer with every node.
Reason R: By storing the $\text{XOR}$ of the addresses of the previous and next nodes.
In the light of the above statements, choose the most appropriate answer from the options given below.
- ABoth $\text{A}$ and $\text{R}$ are true and $\text{R}$ is the correct explanation of $\text{A}$Correct answer
- BBoth $\text{A}$ and $\text{R}$ are true but $\text{R}$ is NOT the correct explanation of $\text{A}$
- C$\text{A}$ is true but $\text{R}$ is false
- D$\text{A}$ is false but $\text{R}$ is true
Answer
(A) Both $\text{A}$ and $\text{R}$ are true and $\text{R}$ is the correct explanation of $\text{A}$
Approach
Check the XOR linked list technique and whether it explains the assertion.
Reviewed by UGC IQ Editorial Team.