Amazon Interview Question

Numerical optimization problem with one-dimensional data