+2
-2
Kotlin/aoc-2022/day4/day4.kt
+2
-2
Kotlin/aoc-2022/day4/day4.kt
···
26
26
27
27
println("${first.first()} <= ${second.first()} && ${first.last()} >= ${second.last()}")
28
28
29
-
if (first.first() <= second.first() && first.last() >= second.last()) {
29
+
if (first.first() <= second.first() && first.last() >= second.first()) {
30
30
// first contains second
31
31
acc + 1
32
-
} else if (first.first() >= second.first() && first.last() <= second.last()) {
32
+
} else if (first.first() >= second.first() && first.first() <= second.last()) {
33
33
// second contains
34
34
acc + 1
35
35
} else acc