LeetCode Solution, Medium, 192. Word Frequency