I have a set of n consecutive operations which each one runs in O(1) amortized complexity.
Can I say that the whole set runs in O(n) worst case time complexity?
How do I prove it ?
I have a set of n consecutive operations which each one runs in O(1)
Share
You didn’t give a code sample so I consider n consecutive operations as an algorithmic for-loop. So the task is to estimate worst case complexity of
In other words
or