I was discussing mortgage calculations with a friend today and realized this calculation would make an excellent interview question.
The problem is simple enough, but still requires some thought…
Writeup: interest-rate-calculations-using-recursion (PDF)
Source: interest-rate-calculations-using-recursion.js
If extra time, the candidate can be asked to write a solve
function to solve for the payment P given the other values, e.g., solve for P in Zr(25*12,315000, 0.005,P) = 0
.