Question: Implement the (class) Circular Linked List to create a list of integers. You need to provide the implementation of the member functions as described in
Implement the (class) Circular Linked List to create a list of integers. You need to provide the implementation of the member functions as described in the following. class CList { private: Node *head; public: CList(); // Checks if the list is empty or not bool emptyList(); // Inserts a new node with value ‘value’ at position ‘pos’ in the list void insert_at(int pos, int value); // Inserts a new node at the start of the list void insert_begin(int value); // Inserts a new node at the end of the list void insert_end(int value); // Deletes a node from position ‘pos’ of the list void deleteNode(int pos); // Deletes a node from the beginning of the list void delete_begin(); // Deletes a node from the end of the list void delete_end(); // Displays the values stored in the list void traverse(); }; |
Step by Step Solution
3.52 Rating (162 Votes )
There are 3 Steps involved in it
Solution Code include include using namespace std class node public int data node next class clist p... View full answer
Get step-by-step solutions from verified subject matter experts
