Frage im Vorstellungsgespräch bei Genpact

2 problems, one on array manipulation and the other on a basic string parsing challenge.