Brute Force || AVS
\n# Code\ncpp []\nclass Solution {\npublic:\n    int mod = 1e9 + 7;\n    int lengthAfterTransformations(string s, int T) {\n        vector<int> v(26);\n        
\n# Code\n```cpp []\nclass Solution {\npublic:\n    int mod = 1e9 + 7;\n    int lengthAfterTransformations(string s, int T) {\n        vector<int> v(26);\n        for (auto& i : s)v[(i - \'a\')]++;\n        int ans = 0;\n        for (int i = 1; i <= T; i++) {\n            int temp = v[25];\n            for (int j = v.size() - 1; j >= 1; j--) {\n                v[j] = v[j - 1];\n            }\n            v[0] = temp;  //a\n            v[1] = (v[1]+temp)%mod;  //b\n        }\n        for (auto& i : v) ans = (ans+i)%mod;\n        return ans;\n    }\n};\n```
['C++']