About this document
Amortized Cost Analysis of Stack Operations by pepito11111 is a document available to read on EtoBox.
The document discusses several examples of analyzing the amortized cost of operations on data structures: 1) A sequence of "MULTIPUSH" operations that push multiple items onto a stack could make the amortized cost O(k) per operation instead of O(1) as k items are pushed each time. 2) A sequence of n operations where the cost of the ith operation is i if i is a power of 2 and 1 otherwise has an amortized cost of O(1) per operation using aggregate analysis. 3) Maintaining a copy of a stack after every k
- Author
- pepito11111
- Language
- EN