Python3. Hashmap + DP, Memo
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```python3 []\nclass Solution:\n    def lengthAfterTransformations(self, s: str, t: int) -> int:\n\n        \n        cn = Counter(s)\n\n        memo = {}\n        def rec(n):\n            \n            if n in memo:\n                return memo[n]\n\n            if n < 26:\n                return 1\n            \n            cnt = 0\n            cnt += rec(n - 26) + rec(n - 25)\n\n            memo[n] = cnt\n\n            return memo[n]\n\n        cnt = 0\n        for st in cn:\n            # print(st)\n            cnt += cn[st] * rec(t + (ord(st) - 97))\n        \n        return cnt % ((10 ** 9) + 7)\n\n```
['Python3']