J.P. Morgan interview question

OO principles, data structures