Beats 80% using simple logic
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    int lengthAfterTransformations(string s, int t) {\n        long long count[300]{0};\n        for (int i = 0; i < s.size(); i++)\n            count[s[i]]++;\n        for (int i = 0; i < t; i++)\n            {\n                // for (int j = \'a\'; j <= \'z\'; j++)\n                //     cout << count[j] << " ";\n                // cout << endl;\n                long long tmp = count[\'z\'];\n                for (int j = \'z\'; j > \'a\'; j--)\n                    count[j] = count[j - 1];\n                count[\'a\'] = tmp % (1000000007);\n                count[\'b\'] += tmp;\n            }\n        long long returnVal = 0;\n        for (int i = \'a\'; i <= \'z\'; i++)\n            returnVal = (returnVal + count[i] % (1000000007)) % (1000000007);\n        \n        return (int)returnVal;\n    }\n};\n```
['C++']