Cheap and Secure Web Hosting Provider : See Now

[Solved]: What does Big O notation actually specify?

, , No Comments
Problem Detail: 

Regarding time complexity I've read conflicting things:

1) That it is worst case.

2) That is average case.

For example if I want to know the time complexity for inserting into an arbitrary point in a linked list ( not the beginning or the end ), on average it will take

(n/2) operations so we can drop the constant and say

it is

n.

So would Big O be n or would Big Omega be n. Or are they the same thing?

Asked By : cade galt

Answered By : Tom van der Zanden

$O$-notation is for upper bounds, $\Omega$-notation for lower bounds.

They can both be used to specify average and worst case bounds.

In your example it is both $O(n)$ and $\Omega(n)$, since both the upper and lower bounds (of the average case running time) are $n/2$.

Best Answer from StackOverflow

Question Source : http://cs.stackexchange.com/questions/48065

3.2K people like this

 Download Related Notes/Documents

0 comments:

Post a Comment

Let us know your responses and feedback