JPMorganChase Interview Question

Coding question that had to do with arrays