File tree 1 file changed +3
-3
lines changed
src/main/kotlin/g3301_3400/s3337_total_characters_in_string_after_transformations_ii
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ package g3301_3400.s3337_total_characters_in_string_after_transformations_ii
4
4
// #2025_05_14_Time_302_ms_(100.00%)_Space_54.72_MB_(100.00%)
5
5
6
6
class Solution {
7
- fun lengthAfterTransformations (s : String , t : Int , numsList : MutableList <Int >): Int {
8
- val localT = buildTransformationMatrix(numsList )
7
+ fun lengthAfterTransformations (s : String , t : Int , nums : List <Int >): Int {
8
+ val localT = buildTransformationMatrix(nums )
9
9
val tPower = matrixPower(localT, t)
10
10
val freq = IntArray (26 )
11
11
for (c in s.toCharArray()) {
@@ -23,7 +23,7 @@ class Solution {
23
23
return result.toInt()
24
24
}
25
25
26
- private fun buildTransformationMatrix (numsList : MutableList <Int >): Array <IntArray > {
26
+ private fun buildTransformationMatrix (numsList : List <Int >): Array <IntArray > {
27
27
val localT = Array (26 ) { IntArray (26 ) }
28
28
for (i in 0 .. 25 ) {
29
29
val steps: Int = numsList[i]
You can’t perform that action at this time.
0 commit comments