Untitled
unknown
c_cpp
4 years ago
395 B
9
Indexable
int c[26] = {0};
int x = s.size();
int y = t.size();
for(int i = 0; i < x; i++){
c[s[i]-'a']++;
}
for(int i = 0; i < y;i++){
c[s[i]-'a']--;
}
for(int i = 0; i < 26; i++){
if(c[i] != 0)
return 0;
break;
}
return 1;Editor is loading...