J.P. Morgan interview question

General programming problems