Pergunta de entrevista da empresa Fidelity Investments

Question relating to architecture and performance improvement techniques of the code