If I have an algorithm that takes 4n^2 + 7n moves to accomplish, what is its O? O(4n^2)? O(n^2)?
I know that 7n is cut off, but I don\'t know if I should keep the n^2 c
The coefficients aren't relevant in Big O notation, so it's just O(n2). As Wikipedia explains:
[...] the coefficients become irrelevant if we compare to any other order of expression, such as an expression containing a term n3 or n2.