Pergunta de entrevista da empresa ING

an assignment, given one week to finish