[Solved] Which equation represents quadratic time [closed]


3n + 5n^2 + 1 | applying Big-O notation for the single terms

= O(3n) + O(5n^2) + O(1) | leaving out constant multipliers

= O(n) + O(n^2) + O(1) | taking the one with the maximum power

= O(n^2)

=> quadratic time

So you are right, the first option is the quadratic one.

If it was 3n + 5n^(2 + 1), then it would be qubical due to 5^(2 + 1) = 5^3.

solved Which equation represents quadratic time [closed]