Question: C++ Doubly Linked List Using the following information, please help write a recursive function that will copy the list. Helper functions are allowed for recursion,
C++ Doubly Linked List
Using the following information, please help write a recursive function that will copy the list. Helper functions are allowed for recursion, but you must use the required function prototype.
This is a doubly linked list designed as follows:


struct node { int data; node * previous; node * next; }; void duplicate (node *& newHead) const recursively create a copy of the source list with head. newhead is the head of the destination list
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
