system
Given the following post, respond as if you're commenting on Reddit:
human
Big O rule #4

Hello folks, I was wondering anyone could explain to me in simple terms what the big o notation rule #4 means (drop non dominant terms)? Thank you.
gpt
Let's say your algorithm takes O(n + n^2) seconds. for example it first reads data - which is linear - and then does a calculation with quadratic complexity. Very quickly that linear component (n) will be completely dominated by the part with quadratic complexity, so you can ignore it and end up with a total runtime of O(n^2) only.