Earlier quoted context omitted.
Unless the question has been edited recently, it did. There are multiple lines in the second example input that show the overlap: > eightwothree > 4nineeightseven2 > zoneight234 I test my AoC solutions incrementally by printing output, so I found that I was failing to produce the correct list of numbers in a line right away. I suppose if you're taking a faster approach and just trying to extract the first and last nu…
So are you saying that overlapped characters can be used for both numbers? Meaning: - eightwothree -> 823 (answer 83) - 4nineeightseven2 -> 49872 (answer 42) - zoneight234 -> z18234 (answer 14) I interpreted the instructions as saying to take the first match from the left and not count the overlaps. Unfortunately this gives the same answer as the overlap interpretation on the examples given in the problem statement:…
Advent of Code 2023 is nigh
171–180 of 319 posts
Re: Advent of Code 2023 is nigh
#172> failed to authenticate. (access_token request returned 429 Too Many Requests) Hope it's just a temporary issue!
Re: Advent of Code 2023 is nigh
#173Earlier quoted context omitted.
What was this edge case you encountered? My code worked...after I finally read the problem closely enough.
For me it was a lack of specific instructions on how to handle overlaps. The edge case that frustrated me for a while was "oneight" at the end of a line. My initial code made it look like this "1ight", when it should have been "18".
one -> eno
two -> owt
three -> eerht
etc
It makes the entire solution extremely simple, though a little verbose.
Re: Advent of Code 2023 is nigh
#174Re: Advent of Code 2023 is nigh
#175Day one part 2 was relatively rough. Things I learned from it: rust regex crate doesn't support look-ahead, rust onig crate is currently broken in many ways and shouldn't be used (the version in crates.io doesn't compile and the version on GitHub is failing tests and look-ahead isn't working). It was a very frustrating time for me. After 2 hours of troubleshooting the above I used the same approach in python and it t…
Re: Advent of Code 2023 is nigh
#176Re: Advent of Code 2023 is nigh
#177I will be doing this advent challenge this year instead: https://adventofchess.com/ Looking forward to read your write-ups!
I submitted this (wrong) answer
1. e3 Na6 2. Bxa6 Nf6 3. Bf1 Ne4 4. d4
but only realised afterwards that it has to be _exactly_ 4 moves, less than 4 moves is not good enough.
Re: Advent of Code 2023 is nigh
#178Earlier quoted context omitted.
Yes, same. I keep seeing people say this on discord and reddit, but that edge case was shown twice in the example.
It shows an overlap, but it doesn't indicate how one should parse it.
Re: Advent of Code 2023 is nigh
#179I think the edge cases were entirely unclear in day 1, part 2. I had to redo it in a "dumb"/brute-force way to avoid using fancy regex tricks I don't know. It's quite clear the small sample data was chosen intentionally to not cover them.
"Find the last occurrence of any one of these strings in a longer string" is just the first problem again but with all the strings reversed.
Re: Advent of Code 2023 is nigh
#180Without going into spoilers, its interesting that people jumped to regex to solve this. For me that was a fairly non intuitive when I first saw the problem(both parts). What jumped to me is the problem statement indicated a finite number of states and I crafted a solution based on that information. But its really cool to see how we all jump to different implementations.
I also started to write a finite state machine for part 2 but found it too tedious to craft by hand. How did you do it?
Once I get a line back from that, it's the same problem as part A.