Goldman Sachs interview question

Newton's method