Java Clean Solution
Complexity\n- Time complexity:O(n+26)\n Add your time complexity here, e.g. O(n) \n\n- Space complexity:O(26)\n Add your space complexity here, e.g. O(n) \n\n# 
# Complexity\n- Time complexity:$$O(n+26)$$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:$$O(26)$$\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```java []\nclass Solution {\n    int MOD = 1_000_000_007;\n\n    public int lengthAfterTransformations(String s, int t) {\n        int[] freq = new int[26];\n        for (char ch : s.toCharArray()) {\n            freq[ch - \'a\']++;\n        }\n        for (int i = 0, j = 25; i < t; i++, j = (j + 25) % 26) {\n            freq[(j + 1) % 26] = (freq[(j + 1) % 26] + freq[j]) % MOD;\n        }\n\n        int sum = 0;\n        for (int f : freq) {\n            sum = (sum + f) % MOD;\n        }\n        return sum;\n    }\n}\n```
['Array', 'Hash Table', 'Math', 'String', 'Java']