(no title)
randomifcpfan | 2 years ago
The lesson is to read the puzzle instructions carefully and avoid solving more general problems.
randomifcpfan | 2 years ago
The lesson is to read the puzzle instructions carefully and avoid solving more general problems.
berkes|2 years ago
What hit me was stupid, but also not covered in the example. It was rather implied and obvious from the example, though.
SPOILER ALERT
In my mistaken implementation `one2three1` would find "1, 2, 3" but not the second case of 1. Now, while the description never explicitly mentioned this, it's still obvious that it should be "11" and not `13`. Though my example, derived by TDD-ing from the example, gave `11`.
Only after I diffed my output with that of a known working solution did I find a few lines (there were several of them, though not that much) that made my issue clear: I missed the second case of a number appearing. So "one1one1one" in my solution would only find the first one.
codr7|2 years ago
b3orn|2 years ago