1
0

Skip set.contains()

This commit is contained in:
Hubert Van De Walle 2020-12-16 09:46:49 +01:00
parent b9a0c574e9
commit edce14cd40

View File

@ -91,8 +91,7 @@ class Day16(@Groups val input: Input<List<List<String>>>) {
val one = values.filter { it.size() == 1 }
.map { it.first() }
.find { !removed.contains(it) }
?.also { removed.add(it) }
.find { removed.add(it) }
?: error("No values left to remove")
for (entry in indexesByCategory.keyMultiValuePairsView()) {