Simple C++ Solution
Complexity\n- Time complexity:O(t*26)\n Add your time complexity here, e.g. O(n) \n\n- Space complexity:O(26)\n Add your space complexity here, e.g. O(n) \n\n# 
# Complexity\n- Time complexity:O(t*26)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:O(26)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```cpp []\nclass Solution {\npublic:\nint lengthAfterTransformations(string s, int t)\n{\n    ios::sync_with_stdio(false);\n    cin.tie(nullptr);\n    cout.tie(nullptr);\n    const int MOD = 1e9 + 7;\n    vector<int> alpha(26, 0);\n    for (int i = 0; i < s.length(); i++)\n    {\n        int x = s[i] - \'a\';\n        alpha[x]++;\n    }\n    t--;\n    while (t>=0)\n    {\n        vector<int> temp(26, 0);\n        for (int i = 0; i < 26; i++)\n        {\n            if (i == 25)\n            {\n                temp[0] = (alpha[25] + temp[0])%MOD;\n                temp[1] = (alpha[25] + temp[1])%MOD;\n                alpha[25] = 0;\n            }\n            else\n            {\n                temp[i + 1] = alpha[i];\n                alpha[i] = 0;\n            }\n        }\n        alpha = temp;\n        t--;\n    }\n\n    int count = 0;\n    for (int i = 0; i < 26; i++)\n    {\n        count = (count+alpha[i])%MOD;\n    }\n    return count;\n}\n};    \n   \n```
['C++']