Skip to content

Commit df1f996

Browse files
spamegg1bishabosha
andauthored
Apply suggestions from code review
Co-authored-by: Jamie Thompson <[email protected]>
1 parent cf8f487 commit df1f996

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/2024/puzzles/day01.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ the second smallest on the left is paired with the second smallest on the right,
4040
Then we can find the distances between them, and sum the distances:
4141

4242
```scala
43-
def part1(input: String): String =
43+
def part1(input: String): Long =
4444
val (lefts, rights) = parse(input)
4545
lefts
4646
.zip(rights)
@@ -57,7 +57,7 @@ then multiply that count by the number itself.
5757
Finally we sum the similarity scores of all the left numbers:
5858

5959
```scala
60-
def part2(input: String): String =
60+
def part2(input: String): Long =
6161
val (lefts, rights) = parse(input)
6262
lefts
6363
.map(left => rights.count(_ == left) * left) // similarity scores

0 commit comments

Comments
 (0)