C++ Solution!!
Intuition\nmaintain a frequency array of characters.\n\n# Approach\nin every tranformation keep on updating the frequency of each character.\n\n# Complexity\n- 
# Intuition\nmaintain a frequency array of characters.\n\n# Approach\nin every tranformation keep on updating the frequency of each character.\n\n# Complexity\n- Time complexity:\nO(N*26)\n\n- Space complexity:\nO(26) or O(1)\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    int mod = 1000000007;\n    int lengthAfterTransformations(string s, int t) {\n        int n = s.length();\n        vector<int> freq(26);\n        for(auto it:s){\n            freq[it-\'a\']++;\n        }\n        for(int i=0;i<t;i++){\n            int cnt_b = 0,cnt_a=0;\n            if(freq[0]>0){\n                cnt_b = freq[0];\n                freq[0]=0;\n            }\n            if(freq[25]>0){\n                cnt_b= (cnt_b + freq[25]) % mod;\n                cnt_a = freq[25];\n                freq[25]=0;\n            }\n            for(int j=25;j>=2;j--){\n                if(freq[j-1]>0){\n                    freq[j] = freq[j-1];\n                    freq[j-1]=0;\n                }\n            }\n            freq[0]=cnt_a;\n            freq[1]=cnt_b;\n        }\n        int ans = 0;\n        for(auto it:freq){\n            //cout<<it<<" ";\n            ans = (ans + it) % mod;\n        }\n        return ans;\n    }\n};\n```
['C++']