News for hackers. Stuff that matters.
Re:Big-O notation explained by a self-taught programmer by fmax30 on Saturday July 27, 2013 @07:24AM (#6112538)
Big O is a upper bound , what I meant was that if a piece of code has O(n) then it also has O(n^2). With emphasis on the upper bound f(x) = O(g(x)) if f(x) <= cg(x).

so my point is if f(N) = O(N) then f(N) is also equal to O(N^2) as f(N) <= CN^2 .

There are no comments on this comment yet.