Consider a variant of dynamic arrays in which when an arraybecomes full, instead of doubling the size of the array, we triplethe size of the array. This way, array sizes will be powers of 3.E.g., on the 28th operation (insertion), the size of array ischanged from 27 to 81.
a) Use aggregate-cost method to find an upper bound for theamortized cost of each operation.
b) Use the accounting method to prove that the amortized cost peroperation is at most 5/2.
c) Use the potential-function method to find an upper bound for theamortized cost of each operation.
Expert Answer
An answer will be
PayPal Gateway not configured
PayPal Gateway not configured