Skip to content

Commit 79b71fc

Browse files
committed
Improved task 3337
1 parent 2eda669 commit 79b71fc

File tree

1 file changed

+34
-2
lines changed
  • src/test/kotlin/g3301_3400/s3337_total_characters_in_string_after_transformations_ii

1 file changed

+34
-2
lines changed

src/test/kotlin/g3301_3400/s3337_total_characters_in_string_after_transformations_ii/SolutionTest.kt

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ internal class SolutionTest {
1212
.lengthAfterTransformations(
1313
"abcyy",
1414
2,
15-
mutableListOf<Int>(
15+
listOf<Int>(
1616
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1717
1, 1, 1, 1, 1, 2
1818
)
@@ -28,12 +28,44 @@ internal class SolutionTest {
2828
.lengthAfterTransformations(
2929
"azbk",
3030
1,
31-
mutableListOf<Int>(
31+
listOf<Int>(
3232
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3333
2, 2, 2, 2, 2, 2
3434
)
3535
),
3636
equalTo<Int>(8)
3737
)
3838
}
39+
40+
@Test
41+
fun lengthAfterTransformations3() {
42+
assertThat<Int>(
43+
Solution()
44+
.lengthAfterTransformations(
45+
"sutnqlhkolxwjtrunkmaakgfyitzluklnrglpbnknbpdvxccpyupjzqldm",
46+
2826,
47+
listOf<Int>(
48+
9, 1, 6, 3, 2, 7, 8, 10, 8, 3, 9, 5, 10, 8, 10, 2, 2, 9, 10,
49+
1, 3, 5, 4, 4, 8, 10
50+
)
51+
),
52+
equalTo<Int>(557232981)
53+
)
54+
}
55+
56+
@Test
57+
fun lengthAfterTransformations4() {
58+
assertThat<Int>(
59+
Solution()
60+
.lengthAfterTransformations(
61+
"mppgvcssluzhipednraxbdfbyn",
62+
3719,
63+
listOf<Int>(
64+
5, 3, 8, 1, 4, 2, 2, 4, 5, 2, 8, 5, 8, 2, 6, 10, 8, 1, 4, 1,
65+
7, 4, 2, 4, 7, 5
66+
)
67+
),
68+
equalTo<Int>(467065288)
69+
)
70+
}
3971
}

0 commit comments

Comments
 (0)