J.P. Morgan Interview Question

Coding challenge, I used Java for it