Question: Need some help with this question, the program needs to be in C++, please include the main and comments so I can understand the program

Need some help with this question, the program needs to be in C++, please include the main and comments so I can understand the program better.

  1. DNode class that can store integer data and the address of next and prev DNode.
  2. Introduce a DLL (Doubly Linked List) class
    1. Introduce a front private data member
    2. Introduce a DLL constructor and destructor
    3. Introduce insertToFront function
    4. Introduce deleteFromFront function
    5. Introduce printAll function
    6. Introduce deleteLast function
    7. Introduce insertToMiddle function
    8. Introduce deleteMiddle function
    9. Introduce deleteLastNode function
    10. InsertInOrder function: insert a new node so the list reads in ascending order from the beginning to the end.
    11. removeOneTargetNode(int target) //remove the first target node found in the list
    12. removeAllTargetNodes(int target)// remove all target node(s) found in the list
    13. 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.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!