J.P. Morgan interview question

Architecture optimization for better performance