Question: 1. x.add(3,200) 2. x.remove(2) (4pts] You have a dynamic array list (e) which has 5 elements and 5 capacity. 0 1 2 3 4 Assuming
1. x.add(3,200)
2. x.remove(2)
(4pts] You have a dynamic array list (e) which has 5 elements and 5 capacity. 0 1 2 3 4 Assuming this dynamic array list works like the DynamicArray class from Project 1 for expansion and shrinking, and has the following method signatures: . void add (int index, T remove (int index); T value) Draw the memory for x (like in the above image) after the following code has been run. Assume you start with a fresh copy of the list as shown in the figure for each question (the questions do not depend on each other). Make sure to draw any memory which is allocated for the capacity but not used
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
