Question: code writing in c++ plz 1. Assume we have a Linkedlist class with a dummy head of type Node and a tailPointer of type Node*

code writing in c++ plz
1. Assume we have a Linkedlist class with a dummy head of type Node and a tailPointer of type Node* which points to the last node in the list (or to the head node if the list is empty). There is also a member int length to store the length of the list, excluding the dummy head node. The struct type Node has members int data and Node *next. Implement the member functions below. a. void Linkedlist:: removeLast(); removes the last node in a nonempty linked list and updates tailPointer and length. If the list is empty, then the function should do nothing. b. void Linkedlist::insertFirst (int data); inserts a new node with the given data right after the dummy head node and updates anything necessary. c. Linkedlist::Linkedlist(); The default constructor: initializes head->next to nullptr and tailPointer to the address of head Also initializes length to 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
