Pregunta de entrevista de Amazon

Numerical optimization problem with one-dimensional data