You've learned Slope Trick. You can now solve DP problems with absolute value costs by tracking slope-change points instead of all values. You know:
Piecewise linear functions are defined by breakpoints.
Priority queues track these dynamically.
Transitions shift or merge functions in time.
This turns into . This is one of the harder DP optimizations. If it feels abstract, that's normal. Practice on the three problems above. Good work finishing here.