For the doublelinked list in the figure below explain the ef
For the double-linked list in the figure below, explain the effect of each statement in the following fragments. DNode* node_ptr = tail->prev; node_ptr->prev->next = tail; tail->prev = node_ptr->prev; DNode* node_ptr= head; head = new DNodef (\"Tamika\"); head->next = node_ptr; node_ptr->prev = head;
Solution
(a)
(b)
This code snippet creates a new Dnode with data \"Tamika\" and adds it at the front of given list, that is, the head of the new list is Dnode with data \"Tamika\".
