GATEverse
← GATE CSE 1993

Q13

NATMarks unknown

Consider a singly linked list having nn nodes. The data items d1,d2,…dnd_1, d_2, \dots d_n are stored in these nn nodes. Let XX be a pointer to the jthj^{\text{th}} node (1≤j≤n)(1 \leq j \leq n) in which djd_j is stored. A new data item dd stored in node with address YY is to be inserted. Give an algorithm to insert dd into the list to obtain a list having items d1,d2,…,dj,d,…,dnd_1, d_2, \dots, d_{j}, d,\dots, d_n in order without using the header.

Sign in to save attempts.

Loading…