1
0

Use LinkedList.peekLast() to avoid walking the whole list

This commit is contained in:
2020-12-18 12:30:13 +01:00
parent b0001697f5
commit b9d62c2835
+1 -1
View File
@@ -58,7 +58,7 @@ class Day18(@Lines val input: Input<List<String>>) {
operands[i + 1] = result
}
return operands.last()
return operands.peekLast()
} else {
var i = 0