So I came upon this time complexity result and I was confused about it, it said that :
O(nlogn) + O(logn) =O(log(n+1))
Why is that the case? Shouldn't the result be O(nlogn)?
So I came upon this time complexity result and I was confused about it, it said that :
O(nlogn) + O(logn) =O(log(n+1))
Why is that the case? Shouldn't the result be O(nlogn)?
n+1
can't be proper Big-O notation, no? We might say O(n log(n)) + O(log(n)) = O( (n+1) log(n) ), but again n+1 doesn't fit Big-O notation. – Erik Eidt Mar 17 '22 at 17:52