Switched dequeue popping around
This commit is contained in:
parent
984ae73600
commit
ec5a7feb3f
@ -44,8 +44,7 @@ struct Day10: Runnable {
|
||||
}
|
||||
if !isIllegalLine {
|
||||
var lineScore = 0
|
||||
s.reverse()
|
||||
while let last = s.popLast() {
|
||||
while let last = s.popFirst() {
|
||||
let charValue = last.closedBy!.autocompleteScore!
|
||||
lineScore = lineScore * 5 + charValue
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user