Simple C++ Solution || (Use Brute Approach) ✅✅
Code\ncpp []\nclass Solution {\npublic:\n    int MOD=pow(10,9)+7;\n    int lengthAfterTransformations(string s, int t) {\n        int n=s.length();\n        vec
# Code\n```cpp []\nclass Solution {\npublic:\n    int MOD=pow(10,9)+7;\n    int lengthAfterTransformations(string s, int t) {\n        int n=s.length();\n        vector<int> freq(26,0);\n        for(int i=0;i<n;i++){\n            freq[s[i]-\'a\']++;\n        }\n        for(int i=0;i<t;i++){\n            int temp=freq[25];\n            for(int k=24;k>=0;k--){\n                freq[k+1]=freq[k];\n            }\n            freq[0]=temp;\n            freq[1]=(freq[1]+temp)%MOD;\n        }\n        int ans=0;\n        for(int i=0;i<26;i++){\n            ans=(ans+freq[i])%(MOD);\n        }   \n        return ans;\n    }\n};\n```
['Math', 'String', 'Counting', 'C++']