What is the big O notation of the following sentence

Viewed 24

What is the big O notation of the following function:

                             n^2 + n log n2^n
1 Answers

We can use some identities on the expression you provided:

      2 + log(2)

is:

      2 + [log + log(2)]

is:

      2 + [log + log2]

Now in terms of asymptotic complexity, O(log + log2) = O(), so then the big O for the whole expression is:

      O(2 + 2) = O(2)

Related