J.P. Morgan interview question

program some basic algorithms and data strtucrues