Pergunta de entrevista da empresa Prudential

Explain your methodology for solving the programming problem.