Domanda di colloquio di Genpact

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