#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= capacity) resize(); else{ for(int i=length;i>=position;i--){ list[i+1] = list[i]; } } } // Delete an element by its value (first occurrence) bool deleteByValue(T value){ // write code } // Delete an element by its position (0-based index) bool deleteByPosition(int position){ // write code } // Search for an element by its value, return the position if found, otherwise -1 int search(T value){ // write code } // Access an element by its position (0-based index) T access(int position){ // write code } // Return the current number of elements in the list int size(){ // write code } // Check if the list is empty bool isEmpty(){ // write code } // Display the elements of the list void display(){ // write code } }; int main() { // write code to test functionalities return 0; }