Question: C++ void CLL::push(char data) { // You write - if the size is 0, add a first node in the linked list // by calling
C++
void CLL::push(char data) { // You write - if the size is 0, add a first node in the linked list // by calling addFirst. Otherwise add a new node to the end of the linked list. Note that this // linked list is circular, so you must make the last node's next pointer point to the first node. } void CLL::addFirst(char data) { // you write - add the very first node to the linked list } void CLL::addAtFront(char data) { // you write - if the size of the linked list is 0, add a first node by calling addFirst. //Otherwise add a new node to the beginning of the list //Since this linked list is circular, you must make the last node now point to this new node //you just added to the front of the linked list }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
