class Solution {
public:
bool CheckPermutation(string s1, string s2) {
if(s1.length()!=s2.length())return false;
int n=s1.length();
int a[26]={0};
int b[26]={0};
for(int i=0;i<n;i++){
int x=s1[i]-'a';
int y=s2[i]-'a';
a[x]++;
a[y]--;
}
for(int i=0;i<26;i++){
if(a[i]!=0)return false;
}
return true;
}
};
for循环写嗨了第二个i<26写成了i<n了。。