Longest Non-Decreasing Subarray After Replacing at Most One Element
Measure the non-decreasing run ending at each position and the run starting after it, then join the two runs across one replaced element.
Measure the non-decreasing run ending at each position and the run starting after it, then join the two runs across one replaced element.