Skip to content

fixups #766

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 19, 2024
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)