A simple tabulation DP Approach (Beats 100%) in C++ .
Intuition\nLets say i got only one character a , now what happens when i do 26 transformations ?? Right it turns into ab\n                            a \n      
# Intuition\nLets say i got only one character a , now what happens when i do 26 transformations ?? Right it turns into ab\n                            a \n                          /   \\\\\n                        a(c1)       b(c2)\n\nSo exactly what state did we end up with , nothing but similar to initial one but left with t-26 operations for child a and t-26 + 1 for child b, why +1 ? because we just assume that first we get second child as a and then convert to b by adding one operation.\n\nSo dp state would be:\n\ndp[t] = dp[t-26] + dp[t-25];\n\nNote: This dp is only for character \'a\'\n\nif(t<26) then dp[t]=1; which is obvious because we are passing beyond \'z\'\n\nSo what do we do for other characters ? Nothing just use up the transformations to first convert into \'ab\' and then use the dp with the left out operations.\n\n\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\nO(t)\n\n- Space complexity:\nO(t)\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    int lengthAfterTransformations(string s, int t) {\n        int MOD = 1e9+7;\n        int n=s.size();\n        \n        vector<int>dp(t+1,1);\n\n        \n        for(int i=1;i<=t;i++){\n            if(i-26>=0)\n            dp[i]=(dp[i-26]+dp[i-25])%MOD;\n        }\n        int ans=0;\n        \n        for(int i=0;i<n;i++){\n             int diff = \'z\'-s[i]+1;\n            if(t-diff<0){\n                ans++;\n                continue;\n            }\n            ans=(ans+(dp[t-diff]+dp[t-diff+1])%MOD)%MOD;\n        }\n\n       \n\n        return ans;\n\n        \n    }\n};\n```
['C++']