std::rotate
Intuition\n Describe your first thoughts on how to solve this problem. \n\# of operations is low, so we can just keep track of the counts of each character by c
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\\# of operations is low, so we can just keep track of the counts of each character by cyclically shifting the counts array.\n\n\n# Complexity\n$$O(n + m*26)$$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\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    {\n        vector<long long> counts(26, 0);\n        for (auto c : s)\n        {\n            counts[c-\'a\']++;\n        }\n        \n        long long ans = s.length();\n        long long mod = 1e9 + 7;\n        while (t--)\n        {\n            std::rotate(counts.begin(), counts.begin() + 25, counts.end());\n            ans += counts[0];\n            counts[1] += counts[0];\n            counts[1] %= mod;\n            ans %= mod;\n        }\n        \n        return (int) ans;\n    }\n};\n```
['C++']