954,506 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Confusion about Algorithm Analysis Problem.

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?

garg
Newbie Poster
14 posts since Aug 2004
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You