Simple easy to understand recursive solution using DP
Intuition\nFirst, transform each character to \'z\'. Then, call a function that can return the length of the string created after t operations.\n\n# Approach\n 
# Intuition\nFirst, transform each character to \'z\'. Then, call a function that can return the length of the string created after t operations.\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nThe `getLength` function will return `2` if the number of transformations is between 1 and 25. If it equals 26, the function will return `3`, as `z` gets converted to `ab` in the first operation. Then, with one operation remaining, it will convert `ab` to `yz` in 24 operations, resulting in `yab`.\n\nIf the transformations are greater than 26, we recursively call the `getLength` function with `t - 26` and `t - 25` operations. This is because in one operation, `z` converts to `ab`, and then in 25 and 24 operations respectively, `a` and `b` will transform back to `z`\n\n\n# Complexity\n- Time complexity: O(t) as once dp array is populated. We will just return the result.\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(t)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```java []\nclass Solution {\n    \n    public static int mod = 1000000007;\n\n    public static Integer[] dp;\n\n    public static int getLength(int t) {\n        if (dp[t] != null ) return dp[t];\n\n        int res = 0;\n        if ( t > 26)\n            res = (getLength(t - 26) + getLength(t - 25) ) % mod;\n        else if (t == 26) \n            res =( 1 + getLength(t - 25) ) % mod ;\n        else if ( t > 0)\n            res = 2;\n        \n    \n        dp[t] =  res;\n        return res;\n\n    }\n    \n    public int lengthAfterTransformations(String s, int t) {\n        \n        int[] count = new int[26];\n        dp = new Integer[t + 1];\n        \n        int res = s.length();\n        \n        for (int i = 0 ; i < 26 ;i++)\n            count[i] = 0;\n        \n        for(int i = 0; i < s.length(); i++) {\n            count[ (int) s.charAt(i) - 97 ]++;\n        }\n        \n        \n        int result = 0;\n        for (int i = 0; i < 26; i++) {\n            if ( (t - (26 - i - 1)) > 0) {\n                long ans = (long) getLength(t - (26 - i - 1)) * (long) count[i];\n\n                long ans2 =  ans % mod;\n                result = (result + (int) ans2) % mod;\n            }\n            else \n                result = (result + count[i]) % mod;\n        }\n        \n        return result;\n        \n    }\n}\n```
['Java']