easy dp soln
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \nI think you can underst
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nI think you can understand by the code \n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->0(n) \n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->0(26*t)\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    long long mod = 1e9 + 7;\n\n    long long f(int c, int t, vector<vector<long long>>& dp) {\n        if (c + t <= 25) {\n            return 0;\n        }\n        if (dp[c][t] != -1) {\n            return dp[c][t];\n        }\n\n        long long ans = (1 + f(0, t - (26 - c), dp) + f(1, t - (26 - c), dp)) % mod;\n        return dp[c][t] = ans;\n    }\n\n    int lengthAfterTransformations(string s, int t) {\n        long long ans = s.size();\n        vector<vector<long long>> dp(26, vector<long long>(t + 1, -1));\n        \n        for (int i = 0; i < 26; i++) {\n            f(i, t, dp);\n        }\n        \n        for (int i = 0; i < s.size(); i++) {\n            if (dp[s[i] - \'a\'][t] != -1) {\n                ans = (ans + dp[s[i] - \'a\'][t]) % mod;\n            }\n        }\n        \n        return ans;\n    }\n};\n\n```
['C++']