Untitled
Anonymous
c_cpp
07/01/2021 7:28 PM
528 B
19
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...