Two Sigma interview question

Newton method in C++