Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/2024/puzzles/day06.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def possibleObstaclesPositionsNumber(g: Guard, startingPov: PointOfView): Int =
newPossibleGuards.par.count(g => looping(g, startingPov))
```

As we are brute forcing, let's use a parallel collection, to use all the potential of our nice hardware, to check multiple lab dispositions at the same time. We also use a `ForkJoinPool` to control the number of threads used by the parallel collection. See how simple it is to use parallel collections in Scala, using the `.par` method.
As we are brute forcing, let's use a parallel collection, to use all the potential of our nice hardware, to check multiple lab dispositions at the same time. See how simple it is to use parallel collections in Scala, using the `.par` method.


This concludes the solution for part 2 of the problem.
Expand Down
1 change: 1 addition & 0 deletions docs/2024/puzzles/day13.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ def part2(input: String): Long =
```

## Solutions from the community

- [Solution](https://github.com/rmarbeck/advent2024/blob/main/day13/src/main/scala/Solution.scala) by [Raphaël Marbeck](https://github.com/rmarbeck)
- [Solution](https://github.com/spamegg1/aoc/blob/master/2024/13/13.worksheet.sc#L109) by [Spamegg](https://github.com/spamegg1)
- [Solution](https://github.com/aamiguet/advent-2024/blob/main/src/main/scala/ch/aamiguet/advent2024/Day13.scala) by [Antoine Amiguet](https://github.com/aamiguet)
Expand Down
1 change: 1 addition & 0 deletions docs/2024/puzzles/day16.md
Original file line number Diff line number Diff line change
Expand Up @@ -473,5 +473,6 @@ given Ordering[Reindeer] = Ordering.by(-_.score)
- [Solution](https://github.com/rmarbeck/advent2024/blob/main/day16/src/main/scala/Solution.scala) by [Raphaël Marbeck](https://github.com/rmarbeck)
- [Solution](https://github.com/TheDrawingCoder-Gamer/adventofcode2024/blob/master/src/main/scala/Day16.scala) by [Bulby](https://github.com/TheDrawingCoder-Gamer)
- [Solution](https://github.com/jportway/advent2024/blob/master/src/main/scala/Day16.scala) by [Joshua Portway](https://github.com/jportway)

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