Without DP || Simple Greedy Simulation ✅
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 ar[] = new int[26];\n        for(char ch : s.toCharArray()) ar[ch-\'a\']++;\n        System.out.println();\n        int mod = (int)1e9 + 7;\n\n        while(t-->0){\n            int cur[] = new int[26];\n            for(int j=0;j<26;j++){\n                if(j==25 && ar[j]>0){\n                    cur[0] = (cur[0] + ar[j])%mod;\n                    cur[1] = (cur[1] + ar[j])%mod;\n                }\n                else{\n                    if(j<25) cur[j+1] = (cur[j+1] + ar[j])%mod;\n                }\n            }\n            ar = cur;\n        }\n        long ans=0;\n        for(int i : ar){\n            ans = (ans + i)%1000000007;\n        }\n        return (int)ans;\n    }\n}\n```
['Array', 'Dynamic Programming', 'Greedy', 'Simulation', 'C++', 'Java']