Standard Slope Trick handles convex functions (V-shaped). What about non-convex? Some problems have functions with multiple valleys. Need more than two heaps. General approach: track all breakpoints in a balanced BST.
But operations become more complex. In practice, most Slope Trick problems are convex. Non-convex cases often need different techniques. Non-convex functions have multiple local minima. Representing them requires tracking more breakpoints.