Thank you for the videos and commentary. I watched them all last year and was looking forward to them again this year. Even though I've switched to C++, seeing your Python solutions is still fun.
For a faster part2 what I did was track the points in the initial connected path at 1024. Then add the corrupt bits 1 by 1 and check my path to see if the new corrupt point was on my path. Only if it was on my path I re-ran the path finding portion. For my input this reduced the number of times I re ran bfs to 32 with total execution time around 250ms.
I did astar. For p2 I reversed it (started with all corrupt bytes in) and went until it did find a path, but idk if that was maybe only good for my data (my answer was on line 3000 out of 3400 something)
Hi, thanks for daily videos. Can you please share the settings of your vim, syntax highlights and so on. I wanna switch from vs code to vim and researching it. Thanks in advance
Thank you for the videos and commentary. I watched them all last year and was looking forward to them again this year. Even though I've switched to C++, seeing your Python solutions is still fun.
Part 2: binary search.
For a faster part2 what I did was track the points in the initial connected path at 1024. Then add the corrupt bits 1 by 1 and check my path to see if the new corrupt point was on my path. Only if it was on my path I re-ran the path finding portion. For my input this reduced the number of times I re ran bfs to 32 with total execution time around 250ms.
I did astar. For p2 I reversed it (started with all corrupt bytes in) and went until it did find a path, but idk if that was maybe only good for my data (my answer was on line 3000 out of 3400 something)
for p2 I've skipped first 1024 tries, knowing it is reachable ;-); it runs ~2.5s
nothing fancy was needed
You can also skip doing the bfs entirely if the new points are not on the path. mine run in ~0.03s
Off by one for me too.. I thought my search algorithm was wrong. Sneaky from Eric to make it so ;-)
just tried P2 with binary search
runs ~100-150ms
Hi, thanks for daily videos. Can you please share the settings of your vim, syntax highlights and so on. I wanna switch from vs code to vim and researching it. Thanks in advance
also hit the 70+1 error...