amortized analysis time complexity problem

Hi all

Is there anybody who can solve this problem? This is not a easy problem. (At least not for me.)

Here is the problem.


Assume that George(S,X) is a function that returns a Boolean value, where S is a stack, and that the time complexity of George is O( log |S| ) , where |S| is the current size of the stack.

Consider the following block of pseudo code.

S <-- the empty stack
For i from 1 to n do
Read (Xi)
While (S! =
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!