Day 18 #adventofcode in the books.
After a run of brutal part 2s for the past few days, this was a softball by comparison. You were given a blank grid, and a list of obstacles to be added.
Part 1 was finding the shortest path after applying 1024 obstacles to the grid. Dijkstras made short work of this.
Part 2 was finding the position of the first obstacle that completely blocked the grid making escape impossible. In my original pathfinder I had set it to return -1 if it could not find a path, so this was simply loop the addition of the obstacles till you hit -1.
No bigint issues with #typescript this time 🤣
=> More informations about this toot | View the thread | More toots from walkerb@infosec.exchange
=> View adventofcode tag | View typescript tag This content has been proxied by September (ba2dc).Proxy Information
text/gemini