Sollicitatievraag bij Prudential

Explain your methodology for solving the programming problem.