```
bool isScramble(string s1, string s2) {
if(s1.size() != s2.size()) return false;
if(s1 == s2) return true;
int n = s1.size();
vector<int> count(26, 0);
for(int i = 0; i < n; i++) count[s1[i]-'a']++;
for(int i = 0; i < n; i++) count[s2[i]-'a']--;
for(auto i : count){
if(i != 0) return false;
}
for(int i = 1; i < n; i++){
if((isScramble(s1.substr(0, i), s2.substr(n-i, i))&&isScramble(s1.substr(i, n-i), s2.substr(0, n-i)))||
(isScramble(s1.substr(0, i), s2.substr(0, i)) && isScramble(s1.substr(i, n-i), s2.substr(i, n-i))))
return true;
}
return false;
}
```

find someone write this code said the time complexity is O(n^6), can someone explain why?