bool CheckPermutation(char* s1, char* s2){ int len1=strlen(s1), len2=strlen(s2); if(len1 != len2) return false; int i, hash[26]={0}; for(i=0; i<len1; i++){ hash[s1[i]-'a']++; for(i=0; i<len1; i++){ if(hash[s2[i]-'a']-- <=0) return false; return true; }