From ec5a7feb3fd577a0394b80ef439d87d332ef2761 Mon Sep 17 00:00:00 2001 From: Max Nuding Date: Fri, 10 Dec 2021 07:43:23 +0100 Subject: [PATCH] Switched dequeue popping around --- Sources/10/10.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Sources/10/10.swift b/Sources/10/10.swift index c730bc7..7cf9337 100644 --- a/Sources/10/10.swift +++ b/Sources/10/10.swift @@ -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 }