Implement a class for Circular Doubly Linked List (with a dummy header node) which stores integers in unsorted order. Your class definitions should look like as shown below: class CDLinkedList; class DNode { friend class CDLinkedList; private int data; private DNode next; private DNode prev; }; class CDLinkedList { private: DNode head; // Dummy header node public CDLinkedList(); // Default constructor public bool insert (int val); public bool removeSecondLastValue (); public void findMiddleValue(); public void display(); };
Course: Data Structure and
Language: C++
Question is well explained
Question #2
Implement a class for Circular Doubly Linked List (with a dummy header node) which stores integers in unsorted order. Your class definitions should look like as shown below:
class CDLinkedList;
class DNode {
friend class CDLinkedList;
private int data;
private DNode next;
private DNode prev;
};
class CDLinkedList
{
private:
DNode head; // Dummy header node
public CDLinkedList(); // Default constructor
public bool insert (int val);
public bool removeSecondLastValue ();
public void findMiddleValue();
public void display();
};
Trending now
This is a popular solution!
Step by step
Solved in 3 steps