Wrong heap type. For min function (convex), use max-heap for left, min-heap for right.
Forgetting to balance heaps. After adding a breakpoint, the heaps might violate the invariant .
Not tracking the base value. The function's minimum value changes with operations. Track it separately.
Off-by-one in slopes. The slope change at breakpoint is + (or + for double insertion). Count carefully.