Short and Fast Solution - Memorization and Chaining
\njavascript []\nconst lengthAfterTransformations = (s, t) => {\n    const m = new Array(t + 1).fill(1);\n    for (let i = 26; i <= t; i++) {\n        m[i] = (m
\n```javascript []\nconst lengthAfterTransformations = (s, t) => {\n    const m = new Array(t + 1).fill(1);\n    for (let i = 26; i <= t; i++) {\n        m[i] = (m[i - 26] + m[i - 25]) % (10**9 + 7);\n    }\n    return [...s]\n        .map((c, $, _, n = c.charCodeAt() - 97) => n + t <= 25 ? 1 : m[t - 26 + n] + m[t - 25 + n])\n        .reduce((x, y) => x + y) % (10**9 + 7);\n};\n```
['JavaScript']