J.P. Morgan interview question

Pointers and objects