Skip to content

Commit 4f9633e

Browse files
authored
docs: day07 day08 itsjoeoui (#759)
1 parent e7bc544 commit 4f9633e

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

docs/2024/puzzles/day07.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def parse(input: String): Seq[(Long, List[Long])] =
3030
```
3131

3232
### Part 1
33+
3334
To find the equations that could possibly be true we iterate over the equations and check each of them using a recursive
3435
`checkEquation` function. Its input is the test value and the list of numbers and its return value is a boolean.
3536
In each iteration we have two choices, either we use the `*` operator, or we use the `+` operator.
@@ -60,6 +61,7 @@ end part1
6061
```
6162

6263
### Part 2
64+
6365
In this part a new concatenation operator `||` is added that combines the digits from its left and right inputs into a
6466
single number, for this we expand the `checkEquation` function with a case that does exactly that. We use `toString` on
6567
the two numbers, concatenate them using `++` and then apply `toLong`, concatenate with the remaining numbers and call
@@ -105,6 +107,7 @@ end part2
105107
- [Solution](https://github.com/profunctor-optics/advent-2024/blob/main/src/main/scala/advent2024/Day07.scala) by [Georgi Krastev](https://github.com/joroKr21)
106108
- [Solution](https://github.com/jportway/advent2024/blob/master/src/main/scala/Day7.scala) by [Joshua Portway](https://github.com/jportway)
107109
- [Solution](https://github.com/TheDrawingCoder-Gamer/adventofcode2024/blob/master/src/main/scala/day7.sc) by [Bulby](https://github.com/TheDrawingCoder-Gamer)
110+
- [Solution](https://github.com/itsjoeoui/aoc2024/blob/main/src/day07.scala) by [itsjoeoui](https://github.com/itsjoeoui)
108111

109112
Share your solution to the Scala community by editing this page.
110113
You can even write the whole article! [See here for the expected format](https://github.com/scalacenter/scala-advent-of-code/discussions/424)

docs/2024/puzzles/day08.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ https://adventofcode.com/2024/day/8
1111
## Solution summary
1212

1313
1. Parse the map to identify the locations of all the antennae,
14-
grouped by their frequency.
14+
grouped by their frequency.
1515
2. Find all the antinode locations within the map boundary.
1616
3. Count the number of distinct antinodes.
1717

@@ -37,7 +37,7 @@ case class AntennaMap(
3737

3838
#### Location
3939

40-
A location is an *x, y* pair along with some helpers for location
40+
A location is an _x, y_ pair along with some helpers for location
4141
arithmetic and range checking.
4242

4343
```scala 3
@@ -130,8 +130,8 @@ def part2(input: String): String =
130130
end part2
131131
```
132132

133-
134133
## Solutions from the community
134+
135135
- [Solution](https://github.com/nikiforo/aoc24/blob/main/src/main/scala/io/github/nikiforo/aoc24/D8T2.scala) by [Artem Nikiforov](https://github.com/nikiforo)
136136
- [Solution](https://github.com/rmarbeck/advent2024/blob/main/day8/src/main/scala/Solution.scala) by [Raphaël Marbeck](https://github.com/rmarbeck)
137137
- [Solution](https://github.com/fthomas/aoc24/blob/main/src/main/scala/Day08.scala) by [Frank Thomas](https://github.com/fthomas)
@@ -146,6 +146,7 @@ end part2
146146
- [Solution](https://github.com/merlinorg/aoc2024/blob/main/src/main/scala/Day8.scala) by [merlinorg](https://github.com/merlinorg)
147147
- [Solution](https://github.com/Philippus/adventofcode/blob/main/src/main/scala/adventofcode2024/Day08.scala) by [Philippus Baalman](https://github.com/philippus)
148148
- [Solution](https://github.com/TheDrawingCoder-Gamer/adventofcode2024/blob/master/src/main/scala/day8.sc) by [Bulby](https://github.com/TheDrawingCoder-Gamer)
149+
- [Solution](https://github.com/itsjoeoui/aoc2024/blob/main/src/day08.scala) by [itsjoeoui](https://github.com/itsjoeoui)
149150

150151
Share your solution to the Scala community by editing this page.
151152
You can even write the whole article! [See here for the expected format](https://github.com/scalacenter/scala-advent-of-code/discussions/424)

0 commit comments

Comments
 (0)