Question: C++, can you please do the whole problem and explain each step too. Thank you for your help and have a great day (include whole
C++, can you please do the whole problem and explain each step too. Thank you for your help and have a great day
(include whole code too)
1. DNode class that can store integer data and the address of next and prev DNode.
2. Introduce a DLL (Doubly Linked List) class
a. Introduce a front private data member
b. Introduce a DLL constructor and destructor
c. Introduce insertToFront function
d. Introduce deleteFromFront function
e. Introduce printAll function
f. Introduce deleteLast function
g. Introduce insertToMiddle function
h. Introduce deleteMiddle function
i. Introduce deleteLastNode function
j. InsertInOrder function: insert a new node so the list reads in ascending order from the beginning to the end.
k. removeOneTargetNode(int target) //remove the first target node found in the list
l. removeAllTargetNodes(int target)// remove all target node(s) found in the list
m. isDuplicate //return true if there is any node that are duplicate in the list. For example, 1->2->3->4 is a unique SLL. However, 1->2->3->2->1 is duplicate since 1 repeats two times and 2 repeats two times.
3. Introduce a CLL (Doubly Linked List) class and all the above functions.
Thank you again
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
