CME Group interview question

Manipulate arraylist of strings