Punctuations interview question

Code to build a hashmap from a string