Skip to content

Commit ab0d85f

Browse files
committed
Fixed sonar
1 parent 73c6e3e commit ab0d85f

File tree

1 file changed

+2
-2
lines changed
  • src/main/kotlin/g3401_3500/s3480_maximize_subarrays_after_removing_one_conflicting_pair

1 file changed

+2
-2
lines changed

src/main/kotlin/g3401_3500/s3480_maximize_subarrays_after_removing_one_conflicting_pair/Solution.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class Solution {
2222
for (start in n downTo 1) {
2323
while (currentIndex >= 0 && cp[currentIndex][0] >= start) {
2424
val end = cp[currentIndex][1]
25-
endPointMap.computeIfAbsent(end) { k: Int -> ArrayList<Int>() }
25+
endPointMap.computeIfAbsent(end) { _: Int -> ArrayList<Int>() }
2626
.add(currentIndex)
2727
currentIndex--
2828
}
@@ -45,7 +45,7 @@ class Solution {
4545
val nextEnd: Int = endPointMap.firstKey()!!
4646
contributions[pairIndex] += (nextEnd - smallestEnd).toLong()
4747
}
48-
endPointMap.computeIfAbsent(smallestEnd) { k: Int? -> ArrayList<Int>() }
48+
endPointMap.computeIfAbsent(smallestEnd) { _: Int -> ArrayList<Int>() }
4949
.add(pairIndex)
5050
}
5151
var result = totalPossible

0 commit comments

Comments
 (0)