Goldman Sachs Interview Question

Write a program which performs Newton's Method to approximate the root of an arbitrary function.