/* Rafay Ahmad 23I-2526 */ #include using namespace std; class ResizableArray{ int* arr; int size; int i; void increaseCapacity(){ int* newArr = new int[size*2]; for(int j=0;j= size) increaseCapacity(); arr[i] = value; i++; } bool insert(int index, int value){ if(index < 0 || index > size) return false; else{ if(i >= size) increaseCapacity(); for(int j=i;j>=index;j--){ arr[j+1] = arr[j]; } arr[index] = value; } return true; } bool remove(int index){ if(index < 0 || index > size) return false; else{ for(int j=index;j size) return false; arr[index] = value; return true; } int get(int index) const{ if(index < 0 || index > size) return -1; return arr[index]; } }; int main(){ return 0; }