Python3 solution.
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n1. Initialize a deque o
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n1. Initialize a deque of length 26 (num of alphabets) with 0.\n2. Add the count of charcters in the deque.\n3. Apply transformation by just `pop()` and `deque.appendlist()`.\n4. return the `sum(deque)`\n\n# Complexity\n- Time complexity: `O(t)`\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: `O(1)`\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```python3 []\nclass Solution:\n    def lengthAfterTransformations(self, s: str, t: int) -> int:\n        q = collections.deque([0]*26)\n        a = ord(\'a\')\n        for i in s:\n            q[ord(i)-a] +=1\n\n        for i in range(t):\n            z = q.pop()\n            q.appendleft(z)\n            q[1]+=z\n\n        return sum(q)%(10**9 + 7)\n```
['Queue', 'Python3']