[Anagrams] Reduce memory cost

By changing `map<string, string>` to `map<string, int>` to reduce memory cost.