JPMorganChase interview question

Coding question that had to do with arrays