Skip to content

Commit 54d9eb8

Browse files
committed
Fixed sonar
1 parent 78b9556 commit 54d9eb8

File tree

1 file changed

+3
-3
lines changed
  • src/main/kotlin/g3501_3600/s3510_minimum_pair_removal_to_sort_array_ii

1 file changed

+3
-3
lines changed

src/main/kotlin/g3501_3600/s3510_minimum_pair_removal_to_sort_array_ii/Solution.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,10 @@ class Solution {
179179
}
180180

181181
private fun compare(i: Int, j: Int): Int {
182-
if (hi[i] != hi[j]) {
183-
return hi[i].compareTo(hi[j])
182+
return if (hi[i] != hi[j]) {
183+
hi[i].compareTo(hi[j])
184184
} else {
185-
return lo[i].compareTo(lo[j])
185+
lo[i].compareTo(lo[j])
186186
}
187187
}
188188

0 commit comments

Comments
 (0)