Insertion in doubly linked list after Specified node
In order to insert a node after the specified node in the list, we need to skip the required number of nodes in order to reach the mentioned node and then make the pointer adjustments as required.
Use the following steps for this purpose.
make the prev of the new node ptr point to temp.
make the next pointer of temp point to the new node ptr.
make the previous pointer of the next node of temp point to the new node.
Enter the item which you want to insert? 12 Node Inserted Press 0 to insert more ? 0 Enter the item which you want to insert? 90 Node Inserted Press 0 to insert more ? 2
Next TopicDoubly Linked List