Question: NEED HELPP Suppose backing array a of an Arraystack is in the following state: a 8 Answer the following questions. Treat each question independently from


NEED HELPP
Suppose backing array a of an Arraystack is in the following state: a 8 Answer the following questions. Treat each question independently from each other, i.e., assume the state of the backing array is as above for each question. 1. (1 pt) What is the index of element C after the following series of method calls? remove (0) remove (3) remove (0) 2. (1 pt) What is the length of the backing array after the following series of method calls? remove (0) remove (3) remove (0) remove (1) 3. (1 pt) What is the length of the backing array after the following series of method calls? remove (0) remove(3) remove (0) remove(1) add(1, 'R') 4. (1 pt) What is index of R after the following series of method calls? remove (0) remove (3) remove (0) remove (1) add(1,R) add(1,,) add(3,T ') add(1,H) 5. (1 pt) What is the final state of the backing array after the following series of method calls? remove (0) remove (3) remove (0) remove(1) add(1, 'R') add(1, ' A ') add(3, 'T') add(1, 'H') add(6, ' B ')
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
