-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add AOC 2024 day2 part2, day3, day4, day5 #68
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking over it, the runtimes for all the algorithms look good, and everything passes.
There is a single console.log that we would want to remove before committing.
Aswell, I feel the specialization of the UDFs could be decreased (e.g. the udf.reduce function in day3-2). However, I would believe it is fine to merge for now, and revisit later.
test/aoc/aoc_2024.test.js
Outdated
arrMid: (arr) => arr[Math.floor(arr.length / 2)], | ||
slice: a => array => array.slice(a), | ||
customSort: (rules, arr) => { | ||
console.log(arr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before pulling into the upstream repo, could we get rid debug print statement removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
MAMMMXMMMM | ||
MXMXAXMASX`; | ||
let match = rh`.input | udf.matchAll "(mul\\\\((\\\\d{1,3}),(\\\\d{1,3})\\\\)|do\\\\(\\\\)|don't\\\\(\\\\))" "g"` | ||
let query = rh`udf.reduce ${match}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to me as though essentially almost all of this problem is done inside this udf.
We can commit it for now, but I think it would be beneficial to come back and try to rewrite it moreso in rhyme.
No description provided.