J.P. Morgan Interview Question

Architecture optimization for better performance