@new2500 Since when a = 0, bx + c will be a linear function, which is monotonic(or flat), so the max value will be one of the two ends (the other being the min value), and the logic will be the same. Actually you can put a = 0 in either a > 0 or a < 0 case.

Sort Transformed Array