Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
encse authored Dec 5, 2024
1 parent 8325f22 commit 6171356
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 2024/Day05/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ Read the [full puzzle](https://adventofcode.com/2024/day/5).

The constraints in both my input and the provided sample input define a total ordering (*) of the pages, which I leveraged in my solution. I implemented a custom parser that returns the list of updates to be printed and a page comparison function. That's all we need. In `Part1`, we check which updates are in the correct order, while in `Part2`, we handle the remaining updates by applying .NET's built-in `OrderBy` function with our custom comparer.

* others say that the ordering is not total, in fact there are loops in it. But it was not an issue for the update lines we need to sort. So the thing below works only because of the Elf magic of X-mas.
(*) others say that the ordering is not total, in fact there are loops in it. But it was not an issue for the update lines we need to sort. So the thing below works only because of the Elf magic of X-mas.

0 comments on commit 6171356

Please sign in to comment.