Easy To understand C++ solution
Intuition\nThink about how to keep the track of frequency of elements after every transaction\n\n# Approach\n Describe your approach to solving the problem. \n\
# Intuition\nThink about how to keep the track of frequency of elements after every transaction\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    const int MOD = 1e9 + 7;\n    \n    int lengthAfterTransformations(string s, int t) {\n        long long len = s.size();\n        vector<int> l(26, 0);\n        \n        for (char ch : s) {\n            l[ch - \'a\']++;\n        }\n        \n        for (int i = 0; i < t; i++) {\n            len = (len + l[25]) % MOD;\n\n            int x = 0, y = 0;\n            if (l[25] > 0) {\n                x = l[25];\n                y = l[25];\n                l[25] = 0;\n            }\n\n            for (int j = 25; j > 0; j--) {\n                l[j] = l[j - 1];\n            }\n\n            l[0] = x;\n            l[1] = (l[1] + y) % MOD;\n        }\n\n        return len;\n    }\n};\n\n```
['C++']