Skip to content

Commit bd1485b

Browse files
authored
Improved tasks 1110, 1123, 3387, 3388, 3389
1 parent 0ceab13 commit bd1485b

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

src/test/kotlin/g1101_1200/s1110_delete_nodes_and_return_forest/SolutionTest.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,15 @@ import com_github_leetcode.TreeNode
44
import org.hamcrest.CoreMatchers.equalTo
55
import org.hamcrest.MatcherAssert.assertThat
66
import org.junit.jupiter.api.Test
7-
import java.util.Arrays
87

98
internal class SolutionTest {
109
@Test
1110
fun delNodes() {
12-
val root = TreeNode.create(mutableListOf<Int?>(1, 2, 3, 4, 5, 6, 7))
11+
val root = TreeNode.create(mutableListOf(1, 2, 3, 4, 5, 6, 7))
1312
assertThat(
1413
Solution().delNodes(root, intArrayOf(3, 5)).toString(),
1514
equalTo(
16-
Arrays.asList<Any?>(
15+
listOf(
1716
TreeNode.create(mutableListOf(1, 2, null, 4)),
1817
TreeNode.create(listOf(6)),
1918
TreeNode.create(listOf(7)),
@@ -29,7 +28,7 @@ internal class SolutionTest {
2928
assertThat(
3029
Solution().delNodes(root, intArrayOf(3)).toString(),
3130
equalTo(
32-
listOf<Any?>(TreeNode.create(mutableListOf<Int?>(1, 2, 4))).toString(),
31+
listOf(TreeNode.create(mutableListOf(1, 2, 4))).toString(),
3332
),
3433
)
3534
}

src/test/kotlin/g1101_1200/s1123_lowest_common_ancestor_of_deepest_leaves/SolutionTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ internal class SolutionTest {
2121
@Test
2222
fun lcaDeepestLeaves2() {
2323
assertThat(
24-
Solution().lcaDeepestLeaves(TreeNode.create(mutableListOf<Int?>(1))).toString(),
24+
Solution().lcaDeepestLeaves(TreeNode.create(mutableListOf(1))).toString(),
2525
equalTo("1"),
2626
)
2727
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import org.junit.jupiter.api.Test
77
internal class SolutionTest {
88
@Test
99
fun maxAmount() {
10-
assertThat<Double?>(
10+
assertThat<Double>(
1111
Solution()
1212
.maxAmount(
1313
"EUR",

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ internal class SolutionTest {
1515

1616
@Test
1717
fun beautifulSplits2() {
18-
assertThat<Int?>(
18+
assertThat<Int>(
1919
Solution().beautifulSplits(intArrayOf(1, 2, 3, 4)),
20-
equalTo<Int?>(0),
20+
equalTo<Int>(0),
2121
)
2222
}
2323
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ internal class SolutionTest {
1212

1313
@Test
1414
fun makeStringGood2() {
15-
assertThat<Int?>(Solution().makeStringGood("wddw"), equalTo<Int>(0))
15+
assertThat<Int>(Solution().makeStringGood("wddw"), equalTo<Int>(0))
1616
}
1717

1818
@Test

0 commit comments

Comments
 (0)