Additional test cases have been added.
This problem needs more tests. For instance, x = [1 10 3 0 2 4 0 8 -9 1] is a case with a non-positive difference, but a maximum change, which would make many solutions fail.
338 Solvers
251 Solvers
Sort numbers by outside digits
128 Solvers
Vectorize the digits of an Integer
269 Solvers
Do Fast Fourier Transformation
221 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!