Question: Recall that we shrink the backing array a when an 3 a. length. If we are currently about to shrink the backing array a, what

Recall that we shrink the backing array a when an 3 a. length. If we are currently about to shrink the backing array a, what can you say about the number of add () and remove operations since the last time the Arraystack was resized? Select one: O a. At least 2/3 remove operations have occurred since then O b. We cannot bound either the number of add() nor remove operations O c. At least 1/2 add operations have occurred since then O d. At least 2/3 add) operations have occurred since then Oe. At least 1/2 remove() operations have occurred since then Suppose we have m operations with various runtimes. Which of the following m operations' runtimes would lead to amortized (1) time that is (m) time spent over all m operations)? Select one a. All of the other choices O b. m-1 operations that each take (1) time, 1 operation that takes Olm) time cm operations that each take Olym) time, the remaining m - m operations each take O(1) time d. m/2 operations that each take 0(2) time, m/4. operations that each take 0(4) time, m/8 operations that each take O(8) time, and O(m/8) operations that each take O(1) time. O em operations that each take Of1) time
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
