J.P. Morgan Interview Question

It was some leet code questions with some array manipulations.