class Solution {
public boolean CheckPermutation(String s1, String s2) {
if(s1.length()!=s2.length())return false;
int[] c=new int[26];
for(int i=0;i<s1.length();i++){
c[s1.charAt(i)-'a']++;
}
for(int i =0;i<s2.length();i++){
if(c[s2.charAt(i)-'a']<=0){
return false;
}
c[s2.charAt(i)-'a']--;
}
return true;
}
}