Java code dynamic programming
Intuition\n Describe your first thoughts on how to solve this problem. \ncount occurrence of each character based on previous round\n# Approach\n Describe your 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\ncount occurrence of each character based on previous round\n# Approach\n<!-- Describe your approach to solving the problem. -->\nUse dynamic programming\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\nO(n)\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nO(n)\n# Code\n```java []\nclass Solution {\n    \n    public int lengthAfterTransformations(String s, int t) {\n        int mod = 1000000007;\n        int[][] dp = new int[t+1][26];\n        for(char c : s.toCharArray()){\n            dp[0][c-\'a\']++;\n        }\n\n        for(int i=1;i<=t;i++){\n            for(int j=1;j<26;j++){\n                dp[i][j] = dp[i-1][j-1];\n            }\n            dp[i][0] = dp[i-1][25];\n            dp[i][1] = (dp[i][1]+dp[i-1][25])%mod;\n        }\n        int res = 0;\n        for(int i=0;i<26;i++){\n            res = (res+dp[t][i])%mod;\n        }\n        return res;\n    }\n}\n```
['Dynamic Programming', 'Java']