Big-O notaion for $2n^4 + \log_2n^8$

101 Views Asked by At

I need to find the best big-O for:

$$3n^4 + \log_2n^8$$ So I said: $$3n^4 + \log_2n^8 = 3n^4 + 8\log_2n \leq 3n^4 + 8n$$ Therefore, the given function is $O(n^4)$ in the best case.

Is this correct?

1

There are 1 best solutions below

2
On BEST ANSWER

The final answer is correct. Note, however, that if the $3n^4$ term was missing, your answer would be $\mathcal{O}(\log_2n)$, not $\mathcal{O}(n)$.