O(T) solution:-
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n. store each char frequ
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n. store each char frequency in vector\n. iterate for t time and for each time move prev char fre to next char fre but there is edge case fro z fre\n. move z fre to a nad b fre\n.at end add all char fre\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\nO(T)\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nO(1)\n\n# Code\n```cpp []\nclass Solution {\npublic:\n int mod=1e9+7;\n    int lengthAfterTransformations(string s, int t) {\n        vector<long long int>fre(26,0);\n        for(auto e:s){\n            fre[e-\'a\']++;\n        }\n        while(t--){\n            int z=fre[25];\n            for(int i=24;i>=0;i--){\n                fre[i+1]=fre[i];\n                fre[i]=0;\n            }\n\n            fre[0]+=z%mod;\n            fre[1]+=z%mod;   \n        }\n        long long int ans=0;\n        for(auto e:fre){\n            ans+=e;\n            ans%=mod;\n        }\n        return ans;   \n    }\n};\n```
['C++']