J.P. Morgan Interview Question

Python technical algorithm questions.