day(05): switch to constant
Signed-off-by: Matej Focko <mfocko@redhat.com>
This commit is contained in:
parent
67a18e2687
commit
1f6867dc98
1 changed files with 1 additions and 1 deletions
|
@ -48,7 +48,7 @@ fun readVector(input: String): Vector {
|
||||||
}
|
}
|
||||||
|
|
||||||
fun findOverlaps(input: List<Vector>): Int {
|
fun findOverlaps(input: List<Vector>): Int {
|
||||||
var points: MutableMap<Point, Int> = mutableMapOf()
|
val points: MutableMap<Point, Int> = mutableMapOf()
|
||||||
input
|
input
|
||||||
.flatMap { it.points }
|
.flatMap { it.points }
|
||||||
.forEach { points[it] = 1 + points.getOrDefault(it, 0) }
|
.forEach { points[it] = 1 + points.getOrDefault(it, 0) }
|
||||||
|
|
Loading…
Reference in a new issue