Simple copied solution
\n\n# Code\njava []\nclass Solution {\n    public int lengthAfterTransformations(String s, int t) {\n        final int MOD = 1000000007;\n        int[] freq = n
\n\n# Code\n```java []\nclass Solution {\n    public int lengthAfterTransformations(String s, int t) {\n        final int MOD = 1000000007;\n        int[] freq = new int[26];\n\n        for(int i=0; i<s.length(); i++){\n            freq[s.charAt(i)-\'a\']++;\n        }\n\n        while(t-->0){\n            int prevZcount = freq[25];\n            for(int i = 25; i>0; i--){\n                freq[i]=freq[i-1];\n            }\n\n            freq[0]=prevZcount;\n            freq[1]=(freq[1]+prevZcount)%MOD;\n        }\n\n        int res = 0;\n        for(int i=0; i<26; i++){\n            res = (res+freq[i])%MOD;\n        }\n\n        return res;\n    }\n}\n    \n```
['Java']