k increment when flipping bits: each time cost may vary. But overall k bits time only cost O(2), not O(kn).
Mythology
find out candidate amortized cost (pretend operation cost)
Prove operation preservation (induction)
saved_before = amortized_cost - actual_cost = saved_after
struct uba_header {
int size;
int limit;
string[] data;
}
Table of Content