4 ms·
this is the post in question: https://nedbatchelder.com/text/slowsgrows.html https://nedbatchelder.com/text/slowsgrows.html and the relevant lines: ''' pyon 1:
by signa11 9y ago
this is the post in question: https://nedbatchelder.com/text/slowsgrows.html https://nedbatchelder.com/text/slowsgrows.html and the relevant lines:
'''
pyon 1:13 PM on 26 Oct 2017
You should be ashamed of this post. How dare you mislead your readers? In amortized analysis, earlier cheap operations pay the cost of later expensive ones. By the time you need to perform an expensive operation, you will have performed enough cheap ones, so that the cost of the entire sequence of operations is bounded above by the sum of their amortized costs. To fix your list example: a sequence of cheap list inserts pays the cost of the expensive one that comes next.
'''