File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed
2024/src/main/kotlin/org/suggs/aoc2024 Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,6 @@ import kotlin.math.abs
5
5
6
6
object Day01HistorianHysteria {
7
7
8
- private val log = LoggerFactory .getLogger(this ::class .java)
9
-
10
8
fun addListDistancesFor (smallData : List <String >): Int =
11
9
addDistancesOfTwoLists(
12
10
smallData.map { it.split(" " ).first().toInt() }.sorted(),
Original file line number Diff line number Diff line change @@ -20,10 +20,10 @@ object Day02RedNosedReports {
20
20
21
21
private fun isDampenedSafeLine (line : List <Int >): Boolean {
22
22
return if (isSafeLine(line)) true
23
- else findSubLisThatIsSafe (line)
23
+ else findCombinationThatIsSafe (line)
24
24
}
25
25
26
- private fun findSubLisThatIsSafe (line : List <Int >): Boolean {
26
+ private fun findCombinationThatIsSafe (line : List <Int >): Boolean {
27
27
for (i in line.indices) {
28
28
val mutated = line.toMutableList()
29
29
mutated.removeAt(i)
@@ -32,5 +32,4 @@ object Day02RedNosedReports {
32
32
return false
33
33
}
34
34
35
-
36
35
}
You can’t perform that action at this time.
0 commit comments