JPMorganChase Interview Question

Array traversal and String manipulation