C++ program Revising the Array-Based List ADT Given the data structure typedef char *Element; struct List { Element *data; int count; int capacity; }; Modify the following insertTail operations, instead of returning false when the array is full, the function should attempt to double the capacity of the list and the old array list is copied into the new array list, and then insert new element. Given the following implementation to modify: bool insertTail(List* l, Element e) { if (fullList(l)) { return false; } else { l->data[l->count] = e; l->count++; return true; } } Solution Creating tempElement array.. and copy old elements. Then replace old array with new temp Array. And also we need to update capacity of list. bool insertTail(List* l, Element e) { if (fullList(l)) { // temp list declared with double size int tempCount = l->count; Element * temp = new Element[2*tempCount]; // copying old list to new list for(int i=0; i<tempCount; i++){ temp[i] = list->data[i]; } //now referencing old array with new array l->data = temp; l->capacity = 2*tempCount; } // no else condition.. it will continue to insert l->data[l->count] = e; l->count++; return true; } .