#include using namespace std; //class template template class List{ private: T* list; // Dynamic array to store the list elements int capacity; // Maximum capacity of the list int length; // Current number of elements in the list void resize(){ // Resize the array to double its current size T* newList = new T[capacity * 2]; for(int i=0;i