solution for the brights'!!!
\n# Complexity\n- Time complexity:\n Add your time complexity here, e.g. O(n) \nO(len(s)+ t*26)-> O(len(s)+t)\n- Space complexity:\n Add your space complexity h
\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\nO(len(s)+ t*26)-> O(len(s)+t)\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nO(26) -> O(1)\n# Code\n```java []\nclass Solution {\n    public static int[] freq;\n    public static int[] newfreq;\n    public static int MOD=1000000007;\n    public void Buildmaps(){\n        freq=new int[26];\n        newfreq=new int[26];\n    }\n    public int[] transform(int[] dp){\n        for(int i=0;i<26;i++){\n            int count=freq[i]%MOD;\n            freq[i]=0;\n            if(i==25){\n                dp[0]=(dp[0]+count)%MOD;\n                dp[1]=(dp[1]+count)%MOD;\n            }\n            else{\n                dp[i+1]=(dp[i+1]+count)%MOD;\n            }\n        }\n        return dp;\n    }\n    public int lengthAfterTransformations(String s, int t) {\n        Buildmaps();\n        for(int i=0;i<s.length();i++){\n            int k=(int)s.charAt(i)-97;\n            freq[k]++;\n        }\n        for(int i=0;i<t;i++){\n            int[] dp=new int[26];\n            freq=transform(dp);\n        }\n        \n        int ans=0;\n        for(int i=0;i<26;i++){\n            ans+=freq[i];\n            ans=ans%MOD;\n        }\n        return (ans)%MOD;\n    }\n}\n```
['Hash Table', 'Dynamic Programming', 'Counting', 'Java']