O(t)
rust []\nimpl Solution {\n    pub fn length_after_transformations(s: String, t: i32) -> i32 {\n\n        let mut x = s.chars().fold([0; 26], |mut x, c| {\n     
```rust []\nimpl Solution {\n    pub fn length_after_transformations(s: String, t: i32) -> i32 {\n\n        let mut x = s.chars().fold([0; 26], |mut x, c| {\n            x[c as usize - \'a\' as usize] += 1; \n            x} );\n        let mut y = [0; 26];\n        for _ in 0..t {\n            for i in 1..26 {\n                y[i] = x[i-1]\n            }\n            y[0] = x[25]; y[1] = (y[1] + x[25]) % 1_000_000_007;\n            x = y\n        }\n        x.into_iter().fold(0, |acc, x| (acc+x) % 1_000_000_007)\n    }\n}\n```
['Rust']