Quest 10: Feast on the Board
- Keep top level comments as only solutions, if you want to say something other than a solution put it in a new post. (replies to comments can be whatever)
- You can send code in code blocks by using three backticks, the code, and then three backticks or use something such as https://topaz.github.io/paste/ if you prefer sending it through a URL
Link to participate: https://everybody.codes/
4 Comments
Pyro@programming.dev · 2 pts · 296d
Python
Took me quite a while to figure out. Did part 3 using DFS initially, then optimized to use memoization.
hades@programming.dev · 2 pts · 296d
good job! yeah it doesn't matter what you do if you need to scan the entire state space :)
lwhjp@piefed.blahaj.zone · 2 pts · 305d
Haskell
Hmm. I'm still not very happy with part 3: it's a bit slow and messy. Doing state over the list monad for memoization doesn't work well, so I'm enumerating all possible configurations first and taking advantage of laziness.
hades@programming.dev · 1 pts · 303d
Rust