Pergunta de entrevista da empresa Amazon

Numerical optimization problem with one-dimensional data