garg 0 Newbie Poster

The Algorithm A is the correct algorithm to solve problem Y.

For each n, A requires N^2 time on all inputs of size n. What can you conclude about the upper bound and lower bound for problem Y

.....

I think I know how to do this maybe. An algorithm A is O(f(n)) means thats... if the input is of size n then the algorithm will stop after f(n) time.

so in the problem O(f(n)) = n^2

So shouldn't the upper bound be the same as any other algorithm that runs at O(n^2)). And lower bound?