KLA interview question

Count of Each Words in String