Very Easy Solution || JAVA
\n# Complexity\n- Time complexity: O(N+t)\n Add your time complexity here, e.g. O(n) \n\n- Space complexity: O(N*26)\n Add your space complexity here, e.g. O(n)
\n# Complexity\n- Time complexity: O(N+t)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(N*26)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```java []\nclass Solution {\n    static int mod = 1000000007;\n    public int lengthAfterTransformations(String s, int t) {\n        int n = s.length();\n        int ans = 0;\n        int dp[][] = new int[26+1][t+1];\n\n        for(int i[]: dp) {\n           Arrays.fill(i, -1); \n        }\n        \n        for(int i=0; i<n; i++) {\n            ans = (ans+findScore((s.charAt(i)-\'a\')+1, t, dp)%mod)%mod;\n        }\n\n\n        return ans;\n    }\n\n    \n    \n    \n    \n    int findScore(int a, int t, int dp[][]) {\n        if(t <= 0 || a+t <= 26) {\n            return 1;\n        }\n        \n        if(dp[a][t] != -1) {\n            return dp[a][t];\n        }\n        \n        return dp[a][t] = (findScore(1, t-(26-a)-1, dp)%mod \n                           + findScore(2, t-(26-a)-1 , dp)%mod);\n    }\n}\n\n\n\n \n\n\n\n\n\n\n\n```
['Java']