diff --git a/src/main/kotlin/g3201_3300/s3273_minimum_amount_of_damage_dealt_to_bob/Solution.kt b/src/main/kotlin/g3201_3300/s3273_minimum_amount_of_damage_dealt_to_bob/Solution.kt index 808784943..e80b0332f 100644 --- a/src/main/kotlin/g3201_3300/s3273_minimum_amount_of_damage_dealt_to_bob/Solution.kt +++ b/src/main/kotlin/g3201_3300/s3273_minimum_amount_of_damage_dealt_to_bob/Solution.kt @@ -22,8 +22,8 @@ class Solution { } internal class Pair(var key: Int, var `val`: Int) : Comparable { - override fun compareTo(p: Pair): Int { - return `val` * p.key - key * p.`val` + override fun compareTo(other: Pair): Int { + return `val` * other.key - key * other.`val` } } } diff --git a/src/main/kotlin/g3301_3400/s3321_find_x_sum_of_all_k_long_subarrays_ii/Solution.kt b/src/main/kotlin/g3301_3400/s3321_find_x_sum_of_all_k_long_subarrays_ii/Solution.kt index 3e7687ec0..ea879fdb9 100644 --- a/src/main/kotlin/g3301_3400/s3321_find_x_sum_of_all_k_long_subarrays_ii/Solution.kt +++ b/src/main/kotlin/g3301_3400/s3321_find_x_sum_of_all_k_long_subarrays_ii/Solution.kt @@ -16,11 +16,11 @@ class Solution { cnt = c } - override fun compareTo(o: RC): Int { - if (cnt != o.cnt) { - return cnt - o.cnt + override fun compareTo(other: RC): Int { + if (cnt != other.cnt) { + return cnt - other.cnt } - return `val` - o.`val` + return `val` - other.`val` } } diff --git a/src/main/kotlin/g3301_3400/s3382_maximum_area_rectangle_with_point_constraints_ii/Solution.kt b/src/main/kotlin/g3301_3400/s3382_maximum_area_rectangle_with_point_constraints_ii/Solution.kt index 9aded6957..76f79ef3c 100644 --- a/src/main/kotlin/g3301_3400/s3382_maximum_area_rectangle_with_point_constraints_ii/Solution.kt +++ b/src/main/kotlin/g3301_3400/s3382_maximum_area_rectangle_with_point_constraints_ii/Solution.kt @@ -45,8 +45,8 @@ class Solution { } private class Pair(val x: Int, val y: Int) : Comparable { - override fun compareTo(p: Pair): Int { - return if (x == p.x) y - p.y else x - p.x + override fun compareTo(other: Pair): Int { + return if (x == other.x) y - other.y else x - other.x } } } diff --git a/src/test/kotlin/g3301_3400/s3310_remove_methods_from_project/SolutionTest.kt b/src/test/kotlin/g3301_3400/s3310_remove_methods_from_project/SolutionTest.kt index c426ecc56..da51dcd95 100644 --- a/src/test/kotlin/g3301_3400/s3310_remove_methods_from_project/SolutionTest.kt +++ b/src/test/kotlin/g3301_3400/s3310_remove_methods_from_project/SolutionTest.kt @@ -29,7 +29,7 @@ internal class SolutionTest { fun remainingMethods3() { assertThat>( Solution().remainingMethods(3, 2, arrayOf(intArrayOf(1, 2), intArrayOf(0, 1), intArrayOf(2, 0))), - equalTo>(listOf()), + equalTo>(listOf()), ) } }