How to correctly pronounce big-oh notation?
I've been reading lots of data structures and algorithm books but I have yet to have a class. Therefore I have a simple question how do you pronounce big-oh notation? Such O(1), O(n), etc? Only reason I ask is I will be giving a presentation and I don't want to say it incorrectly.
Every computer scientist I have ever talked to pronounces it "O of n" or "big O of n squared". "O to the n" would imply exponentiation.
O(n) == "Order n" or "Order of n"
O(n^2) == "Order n squared"... etc.
Big-oh is meant to indicate the highest order term in the polynomial representing the time or space complexity of an algorithm. If the time complexity is 3n^2 + log n + 5n + 20, or some other arbitary polynomial, then the algorithm would run in "order n squared" time. The n^2 term dominates as n approaches infinity, so you can disregard the others, generally.
O(n^2) == "Order n squared"... etc.
Big-oh is meant to indicate the highest order term in the polynomial representing the time or space complexity of an algorithm. If the time complexity is 3n^2 + log n + 5n + 20, or some other arbitary polynomial, then the algorithm would run in "order n squared" time. The n^2 term dominates as n approaches infinity, so you can disregard the others, generally.
I was just thinking about it, and sometimes you can use entirely different language altogether.
For example, an O(log n) algorithm can be said to have "order log n" complexity, or you can just say that it has logarithmic complexity.
O(n) has linear complexity. O(n^x) has polynomial complexity. O(x^n) has exponential complexity... etc.
For example, an O(log n) algorithm can be said to have "order log n" complexity, or you can just say that it has logarithmic complexity.
O(n) has linear complexity. O(n^x) has polynomial complexity. O(x^n) has exponential complexity... etc.
Every computer scientist I have spoken to pronounced it "Ordo", like O(n2) goes "Ordo n squared". So did all my algebra and calculus lecturers. Might there be a difference in language?
Order n, Order n squared, Order n log n, etc. I usually stick to "constant time" for O(1), but that's not really that important.
All my professors in University prefix "Big Oh of". I suspect it's because it is a capital O rather than a lowercase O, to avoid confusion.
Quote:Original post by sordid
All my professors in University prefix "Big Oh of". I suspect it's because it is a capital O rather than a lowercase O, to avoid confusion.
Ditto.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement