Answered step by step
Verified Expert Solution
Question
1 Approved Answer
im having trouble with this assignment in C++ the top pictore is the requirments and the bottom is the start i was given thank you
im having trouble with this assignment in C++ the top pictore is the requirments and the bottom is the start i was given thank you for your help
DoublyLinked List Hide Folder Information Instructions Implement DoublyLinked List. : each node contains two pointers: one to the next node in the list, one to the previous node in the list Refer the attached file to define the DoublyLinkedList. Implement the following operations 1. add a node in the end of the list 2. add a node in the beginning of the list 3. Display the list contents forward 4. Display the list content backwards. Start Date class DLinklist { private: //define each node in the list struct DLLNode { int value; //store value in the node struct DLLNode *next; //pointer to the next node struct DLLNode *prev; //pointer to the previous node }; DLLNode *head, *tail; int nodeCount; public: DLinkList() { head = nullptr; tail nullptr; nodeCount = 0; } -DLinklist();//destructor //add a function that appends nodes in the end of list void add_end(int); void add_begin(int);//inserts a new node in the start position 2);//inser void display_forward(); //display the contents in the list void display_back();//display the contents in the list }Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started