Question d’entretien chez JPMorganChase

Both questions on simple array manipulation with straightforward optimizing