and increase the array size by the sequence for some positive constant .
In an array-based implementation, whenever a stacks become full, it is common to just double its size. Suppose that instead of doubling every-time, we start with an array of sizeIn such a stack, suppose we execute push operations. The total cost complexity of this operation can be asymptotically expressed as a function in terms of and . If for some exponents and . What is the value of ?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Python 3.4: