Easy Python | Recursion + Memoization
Code\npython3 []\nclass Solution:\n    def lengthAfterTransformations(self, s: str, t: int) -> int:\n\n        d = {\n            \'a\': 0,\n            \'b\': 
# Code\n```python3 []\nclass Solution:\n    def lengthAfterTransformations(self, s: str, t: int) -> int:\n\n        d = {\n            \'a\': 0,\n            \'b\': 1,\n            \'c\': 2,\n            \'d\': 3,\n            \'e\': 4,\n            \'f\': 5,\n            \'g\': 6,\n            \'h\': 7,\n            \'i\': 8,\n            \'j\': 9,\n            \'k\': 10,\n            \'l\': 11,\n            \'m\': 12,\n            \'n\': 13,\n            \'o\': 14,\n            \'p\': 15,\n            \'q\': 16,\n            \'r\': 17,\n            \'s\': 18,\n            \'t\': 19,\n            \'u\': 20,\n            \'v\': 21,\n            \'w\': 22,\n            \'x\': 23,\n            \'y\': 24,\n            \'z\': 25\n        }\n\n        MOD = 10**9 + 7\n        ans = 0\n        memo = {}\n        \n        def count(c):\n            if c<26:\n                return 1\n            if c in memo:\n                return memo[c]\n            temp = count(c-26) + count(c-25)\n            memo[c] = temp\n            return temp\n\n        for l in s:\n            ans+=count(d[l]+t)\n        return ans % MOD\n        \n                \n            \n            \n            \n            \n                    \n```
['Recursion', 'Memoization', 'Python3']