total-characters-in-string-after-transformations-i
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```java []\nclass Solution {\n    public int lengthAfterTransformations(String s, int t) {\n        int mod = 1000000007;\n        long[] arr = new long[26];\n        for(int i=0;i<s.length();i++){\n            arr[s.charAt(i)-\'a\']++;\n        }\n\n        for(int i=0;i<t;i++){\n            long z = arr[25];\n            for(int j=25;j>0;j--){\n                arr[j] = arr[j-1]%mod;\n            }\n            arr[0] = z%mod;\n            arr[1] = (arr[1]+z)%mod;\n        }\n        long len = 0;\n        for(int i=0;i<26;i++){\n            len = (len+arr[i])%mod;\n        }\n        System.out.println(Arrays.toString(arr));\n        return (int)len;\n    }\n}\n```
['Java']