J.P. Morgan Interview Question

jumbled numbers coding exercise in java