Nice! I was yelling at the screen "only the first occurrence!!", since I got lucky and caught this tiny information snippet on first read through the instructions. I liked the session about the performance optimization. I'm not familiar with divan and learned a lot. Especially that there is a thing that allocates things in rust and you can influence how it behaves ;-)
@flwiАй бұрын
oh, btw - there was an easy speed gain by using rayon for the iterator over the seeds. Had to replace the outer fold by reduce. Time for part 2 came down from 192ms to 47ms.
@GelidGanefАй бұрын
This series is the only reason i know what day it is in December or have had the impetus to do any of my Christmas shopping
@AhmadAli-kv2hoАй бұрын
Its already day 22??? Damn time flies lol
@Moof_WoofАй бұрын
Medium spoilers for day 21: There's probably lots of ways to solve the day (memoization perhaps?), but there was one realisation that made the day bearable for me: Keypad inputs always Start and End on A. This means that there's so much state that can just be ignored. More in depth spoilers: You don't even need to keep the order you do the button presses, A robot at stage X needs to press a specific button Y times, which is all you need to know to calculate how many button presses that took for the robot at stage X+1. I did need to mess about with the order of inputs to this calculate function to avoid going into the invalid blank space, probably what I spent most time on. I do agree that I didn't really enjoy the puzzle. And I waited until today to tackle it.
@funkyprogrammer8005Ай бұрын
Which IDE is this? Thx.
@chrisbiscardiАй бұрын
@@funkyprogrammer8005 vscode with basically everything turned off and a right hand sidebar