Amazon interview question

Questions about hashmap, regex, and arrays