Question: Q3: Here is an implementation of add function in the doubly linked list. Complete the code by filling in the last line (??? Part) with

Q3: Here is an implementation of add function in the doubly linked list. Complete the code by filling in the last line (??? Part) with your code and briefly explain your answer. = e; // insert new node before v void DLinkedList::add (DNode* v, const Elem& e) { DNodet u new DNode; // create a new node for e u->elm // u coppies element of e u->next = V; // link u in between v u -> prev = v-> prev; // ??? // replace ??? with your code }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
