11
๐ - 2023 DAY 12 SOLUTIONS -๐
(programming.dev)
An unofficial home for the advent of code community on programming.dev! Other challenges are also welcome!
Advent of Code is an annual Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.
Everybody Codes is another collection of programming puzzles with seasonal events.
Solution Threads
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 |
Icon base by Lorc under CC BY 3.0 with modifications to add a gradient
console.log('Hello World')
Thanks for the detailed explanation. It helped a lot, especially what the
tblactually holds.I've read your code again and I get how it works, but it still feels kinda strange that we are considering values outside of range of
aandb, and that we are marking them as correct. Like in first row of the example???.### 1,1,3, there is no spring at8and no group at3but we are marking(8,3)and(7,3)as correct. In my mind, first position that should be marked as correct is4,2, because that's where group of 3 can fit.If you make the recurrent case a little more complicated, you can sidestep the weird base cases, but I like reducing the endpoints down to things like this that are easily implementable, even if they sound a little weird at first.
You are probably right. Just my rumblings. Thanks for the help.