LeetCode dagi bugungi kun 49. Group Anagrams masalasiga simple yechim
class Solution {
public:
string hash(string s){
string res('*',29);
for(char c:s)
res[c-97]++;
return res;
}
vector groupAnagrams(vector& strs) {
vector res;
unordered_map mp;
for(int i=0;i
class Solution {
public:
string hash(string s){
string res('*',29);
for(char c:s)
res[c-97]++;
return res;
}
vector groupAnagrams(vector& strs) {
vector res;
unordered_map mp;
for(int i=0;i