News for hackers. Stuff that matters.
Re:Big-O notation explained by a self-taught programmer by Retric on Saturday July 27, 2013 @05:13AM (#6112319)
Suppose you had three functions.

  F1(n) = 1 second * n + 1 day = O(n)
  F2(n) = 1 millisecond * n + 1 month = O(n)
  F3(n) = 1 nanosecond * n ^ 2 + 1 millisecond = O(n^2)
For really big numbers both F1 and F2 are faster but at n = 100 F3 has a huge lead and for say n = 1 billion F3 beats F1 but not F2.

There are no comments on this comment yet.