What does O (logn) + O (n) mean?

I was just told that my code should follow the O (logn) + O (n) complexity guide. When I was asked to clarify, I was presented with "code complexity :)". In any case, any clarification beyond the one provided will be appreciated.

+4
source share
2 answers
O(logn) + O(n) = O(n) 

"Someone just told me that my code should follow the O (logn) + O (n) complexity guide" - without knowing what your code should do, no one can answer what its reasonable complexity should be,

See the Big O Badge

+6
source

Without context, it is rather difficult to answer. "O (logn) + O (n)" alone does not make much sense, since the asymptotic complexity of any given algorithm will be determined by the linear term, so the notation "+ O (logn)" does not explain anything.

+3
source

All Articles