J.P. Morgan interview question

oops threading design pattern