Search code examples
algorithmbig-onotation

What is the time complexity of the following equation


I'm having a few problems working out the time complexity using Big-O notation.

This is the equation: 88n^2 logn + 81 + 3n^3 + 12n

I can figure it out I'm guessing its something like: O(n^2 logn) or O(n^3)

Thanks in advance.


Solution

  • As you know n grow faster than logn.

    You also know we can multiply same strength factor to a complexity equation.

    So we could simply say n^3 grow faster than n^2 logn.

    => O(n^3)