Vidyalelo
Data Structure · Q50

Linked Lists in Data Structures

Programming · Data Structure · question 50

Q50

Consider the following pseudocode of insertion in XOR list and write the approximate code snippet of it. void xor-linked-list insert(struct node **head_ref, int value) node *new_node = new (struct node); new_node->value = value; new_node->nodepointerxored = xor (*head_ref, NULL); if (*head_pointer == NULL) printf("invalid"); else let b,c,d are nodes and a is to be inserted at beginning, a address field must contain NULL xor b and b address filed must be a xor c. *head_pointer = new_node;

Options are not available for this question.

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board