Hacker News new | ask | show | jobs
by lordlicorice 5125 days ago
"Take the most significant part, rip off the constants, and that's its growth rate."

Well, it's an upper bound on its growth rate. And only after some possibly-gigantic n.

1 comments

Yeah I understand. I was describing how I did it in Algebra II. They would give up f(n) = 5x^3 +4x + 8 and we would know that it was O(x^3).

We also understood that it was as n -> infinity, hence why f(n) = 2x^4 would have a larger growth rate than g(n) = x^2 + 5000. When you're talking about scalability when programming, you're going to have to understand big-O, how constant factors come into play (why Floyd-Warshall at O(n^3) is often better in practice), and how big-\Theta works. If not, you're eventually going to make a mistake and slow everything down.