



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Aggregate Method
X A[4] A[3] A[2] A[1] A[0] Total Cost 0 0 0 0 0 0 0 1 0 0 0 0 1 1 2 0 0 0 1 0 3 3 0 0 0 1 1 4 4 0 0 1 0 0 7 5 0 0 1 0 1 8 6 0 0 1 1 0 10 7 0 0 1 1 1 11 8 0 1 0 0 0 15 9 0 1 0 0 1 16
Accounting Method
a, b, c, d, e Amortized cost b, a(1), c, d, e accessed b 2 c, b, a(2), d, e accessed c 4 a, c, b, d, e accessed a 1 e a(1), c, b, d accessed e 6 a, c, b, d, e accessed a 1 a, c, b, d, e accessed a 1
Potential Method
1 delete lg(n)/n call to new