+1 (218) 451-4151
glass
pen
clip
papers
heaphones

1. Revise the array list implementation given in Section 7.2.1 so that when the actual number of…

1. Revise the array list implementation given in Section 7.2.1 so that when the actual number of…

1. Revise the array list implementation given in Section 7.2.1 so that when the actual number of elements, n, in the array goes below N/4, where N is the array capacity, the array shrinks to half its size.2. Prove that when using a dynamic array that grows and shrinks as in the previous exercise, the following series of 2n operations takes O(n) time: n insertions at the end of an initially empty list, followed by n deletions, each from the end of the list.