Skip to content

Commit

Permalink
[2024/4] Refactor Part 1
Browse files Browse the repository at this point in the history
  • Loading branch information
pfolta committed Dec 4, 2024
1 parent ed6755f commit cfb1fce
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/kotlin/adventofcode/year2024/Day04CeresSearch.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ class Day04CeresSearch(customInput: PuzzleInput? = null) : Puzzle(customInput) {
.map { coordinates -> coordinates.map { (x, y) -> grid[x][y] }.joinToString("") }
}
}
.filter { candidate -> candidate == xmas || candidate == xmas.reversed() }
.size
.count { candidate -> candidate == xmas || candidate == xmas.reversed() }
}

fun countMasCrossed(): Int {
Expand Down

0 comments on commit cfb1fce

Please sign in to comment.