Suppose we are maintaining a data structure under a series of opera-tions. Let f(n) denote the actual running time of the nth operation.For each of the following functions f, determine the resulting amortized cost of a single operation.
(a) f(n)=n if n is a power of 2, and f(n)=1 otherwise.
(b) f(n)=n² if n is a power of 2, and f(n)=1 otherwise.