
Examples of Complexity Calculation 431
1. Amortized analysis fi nding the average
running time per operation over a worst-case
sequence of operations. Amortized analysis
differs from average-case performance in
that probability is not involved; amortized
analysis guarantees the time per operation
over worst-case performance.
2. Binary heap a particularly simple kind of
heap data structure created using a binary
tree. It can be seen as a binary tree with two
additional constraints: the shape property
– the tree is either a perfectly balanced binary
tree (all leaves are at the same level), or, if the
last level of the tree is not complete, the ...