Question: File supplied.o contains code that can build, display, and destroy a doubly linked list . For this lab, you will need to write the following
File supplied.o contains code that can build, display, and destroy a doubly linked list.
For this lab, you will need to write the following two functions in dlist.cpp, and add function prototypes for them to dlist.h.
void duplicate(node * head, node *& newHead)
recursively create a copy of the source list with head where newhead is the head of the destination list.
int removeTwo(node *& head)
recursively remove all the 2s from the list
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
