Maximum Pulse Value After One Subarray Rotation
Alternating signs decide the pulse. One left rotation of a segment only changes the two ends, so each right end needs just the best earlier left end.
Alternating signs decide the pulse. One left rotation of a segment only changes the two ends, so each right end needs just the best earlier left end.