79661051

Date: 2025-06-10 19:44:48
Score: 2.5
Natty:
Report link

When defining a potential function, try to make it proportional to the number of small cost operations that come before each large cost operation. For example, if you are finding the amortized cost of a dynamic array, your small operation is adding an element to the array. Thus, the potential function will be some constant times the number of elements in the array. You can figure out the constant later. Keep in mind that the potential function must capture some state of your data structure.

Reasons:
  • No code block (0.5):
  • Single line (0.5):
  • Starts with a question (0.5): When
  • Low reputation (1):
Posted by: emerald