What is BigO notation of f(n) = f(n/3) + f(n-5)? Can we just say f(n) = O(logn) + O(n) therefore O(n).

1 Answers

0
mohammad RaoofNia On

the difference between time complexity and Big-O is:

  • time complexity is an exact value which tells use how much does a program take time to be executed.
  • but Big-O is an estimation of the time complexity in main parts of the code.

so, if you want the big-O you can say it's O(n) but if what you need is time complexity you should calculate a certain value.