JPMorganChase interview question

Array traversal and String manipulation