Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

What is the proper way to convey an algorithm complexity in Big-O notation in speech?

Dose "the total number of operations is big oh of N log N" sounds strange?

What's generally accepted:

"It have "order log n" space complexity"?

"It is guaranteed to run in n log n time"?

share|improve this question
    
"Ow", as in: my head hurts... –  sdg Apr 20 '11 at 12:41
    
Big-"oh" <garbage> –  Ritwik G Oct 8 '11 at 9:23
add comment

6 Answers

up vote 12 down vote accepted

Personally I would just say "this algorithm is n log n". Anyone who is going to understand what that means will understand it from that phrasing; anyone who isn't, won't be helped by anything more verbose.

share|improve this answer
add comment

I say "order n" (or n squared etc).

If you are among computer scientists you may need to specify "big-O" or "omega" etc, as they are different, but most programmers simply refer to "order" meaning big-O. See here for more gory details: http://en.wikipedia.org/wiki/Big_O_notation

share|improve this answer
add comment

I usually just say 'oh', as in:

Bubble sort is oh n squared

or:

Binary searches are oh log n

share|improve this answer
add comment

If you are speaking in a formal setting, such as making a presentation, it's good to say "This algorithm runs in time big-oh n log n".

If you are talking casually with another engineer (who also understands these concepts), you can be less formal and say "this runs in n log n time" or "this runs in order n log n time" or "this algorithm is n log n".

share|improve this answer
add comment

Just as f(n) is pronounced "f of n" and y(x) is "y of x", so O(n^2) is pronounced "o of n squared" or sometimes "big o of n squared."

share|improve this answer
add comment

Every time i need to talk about Big O notation, lets say "Oh this algorithm Big O complexity is X", i try to explain it like that an algorithm complexity is at most X (where X could be n , n^a , a^n , log n, etc.), so the algorithm will behave in the worst case like the function X.

In most cases there is no need to specify Big O but there are 2 more methods to calculate complexity. One tries to look for a minimun bound, so the explanation now is "The algorithm behaves in the best case like X" , and finally there is a way to use stadistics to try to determine how does your algorithm work in most cases.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.